]> 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:45 +0000 (22:48 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 31 Aug 2005 22:48:45 +0000 (22:48 +0000)
Lib/shutil.py

index baedd4cd9625c5da87623fb3831a44c2ab788d5c..14baa71e83a33c2e15ee20c4c63fb7b9a19a4b09 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])
     copystat(src, dst)
     if errors:
         raise Error, errors