]> granicus.if.org Git - python/commitdiff
Fix failure in error handler -- exc[-1] -> exc.args[-1].
authorGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 13:18:47 +0000 (13:18 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 29 Aug 2007 13:18:47 +0000 (13:18 +0000)
Lib/distutils/dir_util.py

index a6c4416a6fe3f4df7d2ef693679121cc80a9722a..7dc1205c496f2938fbf46fd8b931178926caf9ce 100644 (file)
@@ -76,8 +76,8 @@ def mkpath (name, mode=0o777, verbose=0, dry_run=0):
                 os.mkdir(head)
                 created_dirs.append(head)
             except OSError as exc:
-                raise DistutilsFileError, \
-                      "could not create '%s': %s" % (head, exc[-1])
+                raise DistutilsFileError(
+                      "could not create '%s': %s" % (head, exc.args[-1]))
 
         _path_created[abs_head] = 1
     return created_dirs