From: Georg Brandl Date: Wed, 31 Aug 2005 22:48:48 +0000 (+0000) Subject: patch [ 1242454 ] shutil.copytree() quits too soon after an error. X-Git-Tag: v2.4.2c1~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3078cb922481646cf35cc31b5e4a358766092af8;p=thirdparty%2FPython%2Fcpython.git patch [ 1242454 ] shutil.copytree() quits too soon after an error. --- diff --git a/Lib/shutil.py b/Lib/shutil.py index 5bc4377fcfeb..30116d2ebd4b 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