[Python-checkins] r67674 - sandbox/trunk/2to3/lib2to3/main.py
benjamin.peterson
python-checkins at python.org
Tue Dec 9 02:58:11 CET 2008
Author: benjamin.peterson
Date: Tue Dec 9 02:58:11 2008
New Revision: 67674
Log:
copy permission bits when making backup files #4602
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 02:58:11 2008
@@ -33,7 +33,7 @@
except os.error, err:
self.log_message("Can't remove backup %s", backup)
try:
- os.rename(filename, backup)
+ shutil.move(filename, backup)
except os.error, err:
self.log_message("Can't rename %s to %s", filename, backup)
# Actually write the new file
More information about the Python-checkins
mailing list