diff options
author | toonn <toonn@toonn.io> | 2020-07-05 16:11:07 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-07-05 16:11:07 +0200 |
commit | 81305e1f53b0ef98d863e987a3551025633a076b (patch) | |
tree | 45386b71bc35703bc1f2ad59c2c9055a13c47f4d | |
parent | 710156c371ac726257f1068546b0da889a26494c (diff) | |
parent | 1a1981255bd9d2546684a50f6cd17d55f72311c8 (diff) | |
download | ranger-81305e1f53b0ef98d863e987a3551025633a076b.tar.gz |
Merge branch 'windowserror'
-rw-r--r-- | ranger/ext/shutil_generatorized.py | 12 |
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) |