mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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.?
|
||||
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…
Add table
Add a link
Reference in a new issue