[Python-checkins] r67678 - sandbox/trunk/2to3/lib2to3/main.py
benjamin.peterson
python-checkins at python.org
Tue Dec 9 03:08:30 CET 2008
Author: benjamin.peterson
Date: Tue Dec 9 03:08:30 2008
New Revision: 67678
Log:
fix #4602 for real
Modified:
sandbox/trunk/2to3/lib2to3/main.py
Modified: sandbox/trunk/2to3/lib2to3/main.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/main.py (original)
+++ sandbox/trunk/2to3/lib2to3/main.py Tue Dec 9 03:08:30 2008
@@ -34,12 +34,13 @@
except os.error, err:
self.log_message("Can't remove backup %s", backup)
try:
- shutil.move(filename, backup)
+ os.rename(filename, backup)
except os.error, err:
self.log_message("Can't rename %s to %s", filename, backup)
# Actually write the new file
super(StdoutRefactoringTool, self).write_file(new_text,
filename, old_text)
+ shutil.copymode(filename, backup)
def print_output(self, lines):
for line in lines:
More information about the Python-checkins
mailing list