From 03943d9808c89b8542fd7d5f3296b0aa575cf838 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 21 Dec 2008 01:29:32 +0000 Subject: [PATCH] Merged revisions 67809 via svnmerge from 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/lib2to3/main.py b/Lib/lib2to3/main.py index a4d148d4558..0d65a2e9767 100644 --- a/Lib/lib2to3/main.py +++ b/Lib/lib2to3/main.py @@ -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: