[ python-Bugs-1525866 ] Bug in shutil.copytree on Windows
SourceForge.net
noreply at sourceforge.net
Thu Jul 20 15:00:46 CEST 2006
Bugs item #1525866, was opened at 2006-07-20 13:00
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Mike Foord (mjfoord)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in shutil.copytree on Windows
Initial Comment:
The problem is that the call to 'copystat(src, dst)'
was added to the shutil.copytree function, in svn
r38363 probably. It will fail always on Windows, since
os.utime does not work on directories.
I guess that a patch similar to this one should fix it:
Index: shutil.py
===================================================================
--- shutil.py (Revision 50710)
+++ shutil.py (Arbeitskopie)
@@ -127,7 +127,12 @@
# continue with other files
except Error, err:
errors.extend(err.args[0])
- copystat(src, dst)
+ try:
+ copystat(src, dst)
+ except WindowsError:
+ pass
+ except OSError, err:
+ errors.extend(err.args[0])
if errors:
raise Error, errors
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1525866&group_id=5470
More information about the Python-bugs-list
mailing list