]> granicus.if.org Git - python/commitdiff
Bug #1472949: stringify IOErrors in shutil.copytree when appending
authorGeorg Brandl <georg@python.org>
Fri, 28 Apr 2006 16:54:25 +0000 (16:54 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 28 Apr 2006 16:54:25 +0000 (16:54 +0000)
them to the Error errors list.

Lib/shutil.py

index 2fca61c164d3bd97abdbb443a8f453a9fa7144b7..c50184c733cf3e413cec3f663bc115456c774701 100644 (file)
@@ -122,7 +122,7 @@ def copytree(src, dst, symlinks=False):
                 copy2(srcname, dstname)
             # XXX What about devices, sockets etc.?
         except (IOError, os.error), why:
-            errors.append((srcname, dstname, why))
+            errors.append((srcname, dstname, str(why)))
         # catch the Error from the recursive copytree so that we can
         # continue with other files
         except Error, err: