From fd58c0324d9ff7684f7faa0b28cd3de4efe86508 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 25 Dec 2008 10:03:43 +0000 Subject: Use cjson if json is not available 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. --- 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.' -- cgit v0.9.1