mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
This commit is contained in:
parent
99d7e4e8eb
commit
a1be88e24d
1 changed files with 4 additions and 0 deletions
|
@ -124,6 +124,10 @@ def copytree(src, dst, symlinks=False):
|
||||||
# XXX What about devices, sockets etc.?
|
# XXX What about devices, sockets etc.?
|
||||||
except (IOError, os.error), why:
|
except (IOError, os.error), why:
|
||||||
errors.append((srcname, dstname, 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)
|
copystat(src, dst)
|
||||||
if errors:
|
if errors:
|
||||||
raise Error, errors
|
raise Error, errors
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue