diff options
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | 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 index 9879b0d..0924c9b 100644 --- a/Lib/distutils/dir_util.py +++ b/Lib/distutils/dir_util.py @@ -125,12 +125,11 @@ def copy_tree(src, dst, preserve_mode=1, preserve_times=1, 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) |