summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-08-31 21:42:20 (GMT)
committerJason R. Coombs <jaraco@jaraco.com>2014-08-31 21:42:20 (GMT)
commit311321edc15d4062babf757e3827341633353d55 (patch)
tree3c5659c5cd3698abd5c9df322f26a599205d2814 /Lib/distutils
parentd28c5f00efd0502ca1efa020807537fd7fc20ac1 (diff)
downloadcpython-311321edc15d4062babf757e3827341633353d55.zip
cpython-311321edc15d4062babf757e3827341633353d55.tar.gz
cpython-311321edc15d4062babf757e3827341633353d55.tar.bz2
#22315: Use advertised API for OSError
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/dir_util.py3
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)