[Collab-qa-commits] r1825 - udd/udd
Andreas Tille
tille at alioth.debian.org
Fri Oct 15 07:43:36 UTC 2010
Author: tille
Date: 2010-10-15 07:43:34 +0000 (Fri, 15 Oct 2010)
New Revision: 1825
Modified:
udd/udd/screenshot_gatherer.py
Log:
Make sure json code will work as well if simplejson is not installed (as for instance on udd.debian.org)
Modified: udd/udd/screenshot_gatherer.py
===================================================================
--- udd/udd/screenshot_gatherer.py 2010-10-15 07:35:47 UTC (rev 1824)
+++ udd/udd/screenshot_gatherer.py 2010-10-15 07:43:34 UTC (rev 1825)
@@ -45,8 +45,10 @@
screenshot_file = my_config['screenshots_json']
fp = open(screenshot_file, 'r')
- # result = json.read(fp.read())
- result = json.load(fp)
+ try:
+ result = json.load(fp)
+ except AttributeError:
+ result = json.read(fp.read())
fp.close()
for res in result['screenshots']:
More information about the Collab-qa-commits
mailing list