summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-08-31 22:48:48 (GMT)
committerGeorg Brandl <georg@python.org>2005-08-31 22:48:48 (GMT)
commit3078cb922481646cf35cc31b5e4a358766092af8 (patch)
tree3e41505c2d2377fee4815598bd504352c46f3ca0 /Lib
parent6b4a932a971d0d2c3969b9d53ad574dfd39d2a44 (diff)
downloadcpython-3078cb922481646cf35cc31b5e4a358766092af8.zip
cpython-3078cb922481646cf35cc31b5e4a358766092af8.tar.gz
cpython-3078cb922481646cf35cc31b5e4a358766092af8.tar.bz2
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/shutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 5bc4377..30116d2 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -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])
if errors:
raise Error, errors