From: Guido van Rossum Date: Wed, 29 Aug 2007 13:18:47 +0000 (+0000) Subject: Fix failure in error handler -- exc[-1] -> exc.args[-1]. X-Git-Tag: v3.0a1~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c7461480b0bd1efa3bb51f15adec90c45d821c3;p=thirdparty%2FPython%2Fcpython.git Fix failure in error handler -- exc[-1] -> exc.args[-1]. --- diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py index a6c4416a6fe3..7dc1205c496f 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -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