--- Lib/shutil.py 2018-02-28 18:00:59.000000000 -0500 +++ Lib/shutil.py 2018-04-18 22:51:29.179750716 -0400 @@ -201,7 +201,7 @@ follow_symlinks=follow) try: lookup("chmod")(dst, mode, follow_symlinks=follow) - except NotImplementedError: + except (NotImplementedError, OSError) as why: # if we got a NotImplementedError, it's because # * follow_symlinks=False, # * lchown() is unavailable, and @@ -212,7 +212,9 @@ # therefore we're out of options--we simply cannot chown the # symlink. give up, suppress the error. # (which is what shutil always did in this circumstance.) - pass + for err in 'EOPNOTSUPP', 'ENOTSUP': + if hasattr(errno, err) and why.errno == getattr(errno, err): + pass if hasattr(st, 'st_flags'): try: lookup("chflags")(dst, st.st_flags, follow_symlinks=follow)