Just like r16670, avoid directory creation error if directory exists
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 04:57:39 +0000 (04:57 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 11 Jun 2010 04:57:39 +0000 (04:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@16672 dcc99617-32d9-48b4-a31d-7c20da2025e4

build/i18n/scripts/dojo_resource.py

index c5aa1a7..90f7183 100755 (executable)
@@ -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)