[ python-Bugs-1472949 ] shutil.copytree debug message problem
SourceForge.net
noreply at sourceforge.net
Fri Apr 28 18:55:18 CEST 2006
Bugs item #1472949, was opened at 2006-04-19 12:42
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1472949&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: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Christophe DUMEZ (hydr0g3n)
Assigned to: Nobody/Anonymous (nobody)
Summary: shutil.copytree debug message problem
Initial Comment:
I noticed a problem in shutil.copytree :
try:
if symlinks and os.path.islink(srcname):
linkto = os.readlink(srcname)
os.symlink(linkto, dstname)
elif os.path.isdir(srcname):
copytree(srcname, dstname, symlinks)
else:
copy2(srcname, dstname)
# XXX What about devices, sockets etc.?
except (IOError, os.error), why:
errors.append((srcname, dstname, why))
'why' isn't displayed in tuple, maybe this line would
be better for debug :
"errors.append((srcname, dstname, why.strerror))"
then, it will display something (for example:
'permission denied').
----------------------------------------------------------------------
>Comment By: Georg Brandl (gbrandl)
Date: 2006-04-28 16:55
Message:
Logged In: YES
user_id=849994
>From rev. 45785, the line reads errors.append((srcname,
dstname, str(why)))
This way, you get the full information out of the
IOError/OSError.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1472949&group_id=5470
More information about the Python-bugs-list
mailing list