summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index a0ff1cd..61dc804 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -343,7 +343,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2,
copystat(src, dst)
except OSError as why:
# Copying file access times may fail on Windows
- if why.winerror is None:
+ if getattr(why, 'winerror', None) is None:
errors.append((src, dst, str(why)))
if errors:
raise Error(errors)