[open-ils-commits] r16607 - trunk/build/i18n/scripts (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jun 7 01:38:11 EDT 2010


Author: dbs
Date: 2010-06-07 01:38:08 -0400 (Mon, 07 Jun 2010)
New Revision: 16607

Modified:
   trunk/build/i18n/scripts/dojo_resource.py
Log:
Smarter error handling in Dojo i18n script

Identify the troublesome file before allowing the traceback


Modified: trunk/build/i18n/scripts/dojo_resource.py
===================================================================
--- trunk/build/i18n/scripts/dojo_resource.py	2010-06-07 05:36:47 UTC (rev 16606)
+++ trunk/build/i18n/scripts/dojo_resource.py	2010-06-07 05:38:08 UTC (rev 16607)
@@ -59,8 +59,11 @@
         # Avoid generating duplicate entries by keeping track of msgids
         msgids = dict()
 
-	#print("Reading Dojo resource file %s" % (source))
-        bundle = simplejson.load(codecs.open(source, encoding='utf-8', mode='r'))
+	try:
+            bundle = simplejson.load(codecs.open(source, encoding='utf-8', mode='r'))
+	except ValueError:
+	    print("Reading Dojo resource file %s" % (source))
+            raise
 
         for key, value in bundle.iteritems():
             if value in msgids:



More information about the open-ils-commits mailing list