From: dbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Fri, 11 Jun 2010 05:00:56 +0000 (+0000)
Subject: Forward port r16670 and r16672 to avoid directory creation errors in Dojo resource... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=95b64a959c89f10de962a06189696411b64b6490;p=evergreen%2Fpines.git

Forward port r16670 and r16672 to avoid directory creation errors in Dojo resource i18n script


git-svn-id: svn://svn.open-ils.org/ILS/trunk@16673 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/build/i18n/scripts/dojo_resource.py b/build/i18n/scripts/dojo_resource.py
index d33f655728..90f7183eb2 100755
--- a/build/i18n/scripts/dojo_resource.py
+++ b/build/i18n/scripts/dojo_resource.py
@@ -115,7 +115,7 @@ def main():
     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 @@ def main():
         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)