import stat
from os.path import abspath
import fnmatch
+import errno
__all__ = ["copyfileobj","copyfile","copymode","copystat","copy","copy2",
"copytree","move","rmtree","Error"]
if hasattr(os, 'chmod'):
os.chmod(dst, mode)
if hasattr(os, 'chflags') and hasattr(st, 'st_flags'):
- os.chflags(dst, st.st_flags)
-
+ try:
+ os.chflags(dst, st.st_flags)
+ except OSError, why:
+ if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP:
+ raise
def copy(src, dst):
"""Copy data and mode bits ("cp src dst").
Library
-------
+- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
+ didn't support chflags() (for example ZFS under FreeBSD). The error is
+ now silenced.
+
- Issue #3890: Fix recv() and recv_into() on non-blocking SSL sockets.
- Issue #6544: fix a reference leak in the kqueue implementation's error