cpython (3.4): #22315: Use advertised API for OSError
http://hg.python.org/cpython/rev/75a5cc4ef31c changeset: 92289:75a5cc4ef31c branch: 3.4 user: Jason R. Coombs <jaraco@jaraco.com> date: Sun Aug 31 17:42:20 2014 -0400 summary: #22315: Use advertised API for OSError files: Lib/distutils/dir_util.py | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/Lib/distutils/dir_util.py b/Lib/distutils/dir_util.py --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -125,12 +125,11 @@ try: names = os.listdir(src) except OSError as e: - (errno, errstr) = e if dry_run: names = [] else: raise DistutilsFileError( - "error listing files in '%s': %s" % (src, errstr)) + "error listing files in '%s': %s" % (src, e.strerror)) if not dry_run: mkpath(dst, verbose=verbose) -- Repository URL: http://hg.python.org/cpython
participants (1)
-
jason.coombs