Issue 1472949: shutil.copytree debug message problem (original) (raw)
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').