summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-07-30 13:00:31 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-07-30 13:00:31 (GMT)
commit4e67838d6c16d3ab14b01ffdb1318aa16ed9bccf (patch)
treef4b80659d7a5c73756f28bc3900cd7cd86b2808e /Lib/shutil.py
parente34ac7ce7a3ed56cf412a425637441f31dd0ad52 (diff)
downloadcpython-4e67838d6c16d3ab14b01ffdb1318aa16ed9bccf.zip
cpython-4e67838d6c16d3ab14b01ffdb1318aa16ed9bccf.tar.gz
cpython-4e67838d6c16d3ab14b01ffdb1318aa16ed9bccf.tar.bz2
Don't copy directory stat times in shutil.copytree on Windows
Fixes #1525866.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index c50184c..c3ff687 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -127,7 +127,13 @@ def copytree(src, dst, symlinks=False):
# continue with other files
except Error, err:
errors.extend(err.args[0])
- copystat(src, dst)
+ try:
+ copystat(src, dst)
+ except WindowsError:
+ # can't copy file access times on Windows
+ pass
+ except OSError, why:
+ errors.extend((src, dst, str(why)))
if errors:
raise Error, errors