Kaydet (Commit) 311321ed authored tarafından Jason R. Coombs's avatar Jason R. Coombs

#22315: Use advertised API for OSError

üst d28c5f00
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment