]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
patch [ 1242454 ] shutil.copytree() quits too soon after an error.
authorGeorg Brandl <georg@python.org>
Wed, 31 Aug 2005 22:48:48 +0000 (22:48 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 31 Aug 2005 22:48:48 +0000 (22:48 +0000)
Lib/shutil.py

index 5bc4377fcfeb0ad052b4c39f31af9046891af388..30116d2ebd4b6d221a493922b28dc3f7510773c5 100644 (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])
     if errors:
         raise Error, errors