]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 67809 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Sun, 21 Dec 2008 01:29:32 +0000 (01:29 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 21 Dec 2008 01:29:32 +0000 (01:29 +0000)
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r67809 | benjamin.peterson | 2008-12-15 21:54:45 -0600 (Mon, 15 Dec 2008) | 1 line

  fix logic error
........

Lib/lib2to3/main.py

index a4d148d45588f3fe70158c5efeae7442be5eef54..0d65a2e976760b2c96110c1dc366676c36272f1a 100644 (file)
@@ -40,7 +40,8 @@ class StdoutRefactoringTool(refactor.RefactoringTool):
         # Actually write the new file
         super(StdoutRefactoringTool, self).write_file(new_text,
                                                       filename, old_text)
-        shutil.copymode(filename, backup)
+        if not self.nobackups:
+            shutil.copymode(filename, backup)
 
     def print_output(self, lines):
         for line in lines: