summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/main.py')
-rw-r--r--Lib/lib2to3/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/lib2to3/main.py b/Lib/lib2to3/main.py
index f551feb..a73149a 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: