mirror of https://github.com/python/cpython
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
This commit is contained in:
parent
99d7e4e8eb
commit
a1be88e24d
|
@ -124,6 +124,10 @@ def copytree(src, dst, symlinks=False):
|
|||
# XXX What about devices, sockets etc.?
|
||||
except (IOError, os.error), why:
|
||||
errors.append((srcname, dstname, why))
|
||||
# catch the Error from the recursive copytree so that we can
|
||||
# continue with other files
|
||||
except Error, err:
|
||||
errors.extend(err.args[0])
|
||||
copystat(src, dst)
|
||||
if errors:
|
||||
raise Error, errors
|
||||
|
|
Loading…
Reference in New Issue