From: dbs Date: Mon, 7 Jun 2010 05:38:08 +0000 (+0000) Subject: Smarter error handling in Dojo i18n script X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1840d562804f2ac371541c6554f6f920bd7d21a9;p=evergreen%2Fbjwebb.git Smarter error handling in Dojo i18n script Identify the troublesome file before allowing the traceback git-svn-id: svn://svn.open-ils.org/ILS/trunk@16607 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/build/i18n/scripts/dojo_resource.py b/build/i18n/scripts/dojo_resource.py index 83fd01379..d33f65572 100755 --- a/build/i18n/scripts/dojo_resource.py +++ b/build/i18n/scripts/dojo_resource.py @@ -59,8 +59,11 @@ class DojoResource (basel10n.BaseL10N): # 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: