summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index dc36820..78504b9 100644
--- a/Lib/shutil.py
+++ b/Lib/shutil.py
@@ -9,6 +9,7 @@ import sys
import stat
from os.path import abspath
import fnmatch
+import errno
__all__ = ["copyfileobj","copyfile","copymode","copystat","copy","copy2",
"copytree","move","rmtree","Error", "SpecialFileError"]
@@ -88,8 +89,11 @@ def copystat(src, dst):
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 as why:
+ if not hasattr(errno, 'EOPNOTSUPP') or why.errno != errno.EOPNOTSUPP:
+ raise
def copy(src, dst):
"""Copy data and mode bits ("cp src dst").