[meld] misc: Ignore ENOTSUP when copying file metadata
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] misc: Ignore ENOTSUP when copying file metadata
- Date: Sat, 8 Nov 2014 22:36:01 +0000 (UTC)
commit 47071a49a02da51137bb4edd0dbec006668ac013
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Nov 9 08:34:21 2014 +1000
misc: Ignore ENOTSUP when copying file metadata
This error will be thrown when, for example, trying to copy files to
an FTP mount. Getting this error is a very strong indication that
doing this metadata modification on this location will *never* work,
so there's not a lot of point in showing the user an error.
meld/misc.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/misc.py b/meld/misc.py
index 5bed516..f6530e8 100644
--- a/meld/misc.py
+++ b/meld/misc.py
@@ -322,7 +322,7 @@ def copy2(src, dst):
try:
shutil.copystat(src, dst)
except OSError as e:
- if e.errno != errno.EPERM:
+ if e.errno not in (errno.EPERM, errno.ENOTSUP):
raise
def copytree(src, dst):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]