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

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Jun 11 01:00:59 EDT 2010


Author: dbs
Date: 2010-06-11 01:00:56 -0400 (Fri, 11 Jun 2010)
New Revision: 16673

Modified:
   trunk/build/i18n/scripts/dojo_resource.py
Log:
Forward port r16670 and r16672 to avoid directory creation errors in Dojo resource i18n script


Modified: trunk/build/i18n/scripts/dojo_resource.py
===================================================================
--- trunk/build/i18n/scripts/dojo_resource.py	2010-06-11 04:57:39 UTC (rev 16672)
+++ trunk/build/i18n/scripts/dojo_resource.py	2010-06-11 05:00:56 UTC (rev 16673)
@@ -115,7 +115,7 @@
     if options.pot:
         pot.get_strings(options.pot)
         if options.outfile:
-            if not os.path.exists(options.outfile):
+            if not os.path.exists(os.path.dirname(options.outfile)):
                 os.makedirs(os.path.dirname(options.outfile))
             pot.savepot(options.outfile)
         else:
@@ -126,7 +126,7 @@
         pot.loadpo(options.create)
         pot.create_bundle()
         if options.outfile:
-            if not os.path.exists(options.outfile):
+            if not os.path.exists(os.path.dirname(options.outfile)):
                 os.makedirs(os.path.dirname(options.outfile))
             outfile = codecs.open(options.outfile, encoding='utf-8', mode='w')
             simplejson.dump(pot.msgs, outfile, indent=4)



More information about the open-ils-commits mailing list