From 1840d562804f2ac371541c6554f6f920bd7d21a9 Mon Sep 17 00:00:00 2001 From: dbs Date: Mon, 7 Jun 2010 05:38:08 +0000 Subject: [PATCH 1/1] 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 --- build/i18n/scripts/dojo_resource.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/i18n/scripts/dojo_resource.py b/build/i18n/scripts/dojo_resource.py index 83fd013797..d33f655728 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: -- 2.43.2