about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-07-05 16:06:44 +0200
committertoonn <toonn@toonn.io>2020-07-05 16:06:44 +0200
commit1a1981255bd9d2546684a50f6cd17d55f72311c8 (patch)
tree45386b71bc35703bc1f2ad59c2c9055a13c47f4d /ranger
parent710156c371ac726257f1068546b0da889a26494c (diff)
downloadranger-1a1981255bd9d2546684a50f6cd17d55f72311c8.tar.gz
Remove WindowsError
`WindowsError` has been merged into `OSError` so we can no longer rely
on it for disambiguation. This means a previously silent error on
Windows regarding the copying of file access times will no longer be
silent.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/ext/shutil_generatorized.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/ranger/ext/shutil_generatorized.py b/ranger/ext/shutil_generatorized.py
index a97a4d2d..fe367696 100644
--- a/ranger/ext/shutil_generatorized.py
+++ b/ranger/ext/shutil_generatorized.py
@@ -15,12 +15,6 @@ __all__ = ["copyfileobj", "copyfile", "copystat", "copy2", "BLOCK_SIZE",
 BLOCK_SIZE = 16 * 1024
 
 
-try:
-    WindowsError
-except NameError:
-    WindowsError = None  # pylint: disable=invalid-name
-
-
 if sys.version_info < (3, 3):
     def copystat(src, dst):
         """Copy all stat info (mode bits, atime, mtime, flags) from src to dst"""
@@ -233,11 +227,7 @@ def copytree(src, dst,  # pylint: disable=too-many-locals,too-many-branches
     try:
         copystat(src, dst)
     except OSError as why:
-        if WindowsError is not None and isinstance(why, WindowsError):
-            # Copying file access times may fail on Windows
-            pass
-        else:
-            errors.append((src, dst, str(why)))
+        errors.append((src, dst, str(why)))
     if errors:
         raise Error(errors)