diff options
author | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-12-25 10:03:43 (GMT) |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2008-12-25 10:06:18 (GMT) |
commit | fd58c0324d9ff7684f7faa0b28cd3de4efe86508 (patch) | |
tree | 8353331c6745789f1676539ba038de9771ccf301 | |
parent | f7a8512a4dbe5c58875178bf714524f61a45b2a8 (diff) |
python-cjson is listed as a system dep of sugar, but json-py is not.
json-py is an implicity dep on Ubuntu and Fedora, but not on other
distros.
Try to use cjson if json isn't installed.
-rw-r--r-- | scripts/report.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/report.py b/scripts/report.py index 3617ee2..0ac8659 100644 --- a/scripts/report.py +++ b/scripts/report.py @@ -183,4 +183,9 @@ try: register_command(cmd_report) except ImportError: - print 'Disable report, json-py is not installed.' + try: + import cjson as json + json.read = json.decode + json.write = json.encode + except ImportError: + print 'Disable report, neither json-py nor python-cjson are not installed.' |