patch [ 1242454 ] shutil.copytree() quits too soon after an error.

This commit is contained in:
Georg Brandl 2005-08-31 22:48:45 +00:00
parent 99d7e4e8eb
commit a1be88e24d
1 changed files with 4 additions and 0 deletions

View File

@ -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