diff options
author | Anthony Sottile <asottile@umich.edu> | 2019-02-25 14:32:27 -0800 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-25 23:32:27 +0100 |
commit | 8377cd4fcd0d51d86834c9b0518d29aac3b49e18 (patch) | |
tree | e8d82c3567b2d39ff0bd285d25ce2d02359ae070 /Lib/shutil.py | |
parent | 9c3f284de598550be6687964c23fd7599e53b20e (diff) | |
download | cpython-git-8377cd4fcd0d51d86834c9b0518d29aac3b49e18.tar.gz |
Clean up code which checked presence of os.{stat,lstat,chmod} (#11643)
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 4 |
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)) |