Commits

Anonymous committed 7f49602

don't overwrite existing files

Comments (0)

Files changed (1)

             parentdir = os.path.dirname(filename)
             if not os.path.exists(parentdir):
                 os.makedirs(parentdir)
-            open(filename, 'w').write(data)
+            if not os.path.exists(filename):
+                open(filename, 'w').write(data)
 
         # monkey patch sys.argv options so we can call pep8
         old_args = sys.argv