Source

pyobjc / Scripts / CodeGenerators / strconst_generator.py

The branch 'pyobjc-ancient' does not exist.
Diff from to

Scripts/CodeGenerators/strconst_generator.py

 
 def generate(dirname, fn = None, ignore=(), filter = lambda x: 1,
             emit_header=1, emit_footer=1):
-    if not os.path.exists(dirname): return
 
     if fn:
         fp = dupfile(fn, 'w')
         fp = sys.stdout
         del sys
 
+    if dirname is None or not os.path.exists(dirname): return
+
     if emit_header:
         fp.write("/*\n")
         fp.write(" * String constants. This file is generated from files in\n")