summaryrefslogtreecommitdiff
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index 29e7564622..1f98a348d7 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -290,10 +290,8 @@ def copymode(src, dst, *, follow_symlinks=True):
stat_func, chmod_func = os.lstat, os.lchmod
else:
return
- elif hasattr(os, 'chmod'):
- stat_func, chmod_func = _stat, os.chmod
else:
- return
+ stat_func, chmod_func = _stat, os.chmod
st = stat_func(src)
chmod_func(dst, stat.S_IMODE(st.st_mode))