Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNirbheek 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)
commitfd58c0324d9ff7684f7faa0b28cd3de4efe86508 (patch)
tree8353331c6745789f1676539ba038de9771ccf301
parentf7a8512a4dbe5c58875178bf714524f61a45b2a8 (diff)
Use cjson if json is not availableHEADmaster
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.py7
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.'