summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2005-08-31 22:48:45 (GMT)
committerGeorg Brandl <georg@python.org>2005-08-31 22:48:45 (GMT)
commita1be88e24d4a9e72f89c755026bb00a5cad59e97 (patch)
tree29c95b2a8e5fe9664495b9280b64bc38bb7760db /Lib/shutil.py
parent99d7e4e8eb0f8971b36e1f63db144423d802ebc2 (diff)
downloadcpython-a1be88e24d4a9e72f89c755026bb00a5cad59e97.zip
cpython-a1be88e24d4a9e72f89c755026bb00a5cad59e97.tar.gz
cpython-a1be88e24d4a9e72f89c755026bb00a5cad59e97.tar.bz2
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index baedd4c..14baa71 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])
copystat(src, dst)
if errors:
raise Error, errors