Mercurial > hrm
changeset 20:c14445b5eee0
Fall back to simplejson for json operations if running Python 2.4 or 2.5.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 11 Dec 2008 02:30:54 -0800 |
parents | 153412fe8bf2 |
children | 7fa60aca382d |
files | hrm.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hrm.py Tue Dec 09 23:24:00 2008 -0800 +++ b/hrm.py Thu Dec 11 02:30:54 2008 -0800 @@ -64,12 +64,16 @@ import os import re import sys -import json import subprocess import distutils.dir_util import time from optparse import OptionParser +try: + import json +except ImportError: + import simplejson as json + # Number of hours that must pass before we purge removed files. HOURS_TO_PURGE = 48