summaryrefslogtreecommitdiffstats
path: root/swift
diff options
context:
space:
mode:
authorPeter Portante <peter.portante@redhat.com>2012-10-17 15:25:34 -0400
committerPeter Portante <peter.portante@redhat.com>2013-04-29 16:35:55 -0400
commita6a6f368b5a1341636be26105e52cd5fbabc8c6e (patch)
tree7d11ea5e69851647d55174bda6d99be8008a0479 /swift
parent3ad78098b54b94ec326c179358fcb38f36a3a344 (diff)
object-storage: Don't catch generic exceptions around xattr calls
We should really avoid catching generic Exception objects around any of our system calls. This simple fix brings this code in line with the other code wrapping xattr calls. Change-Id: I75492a61081fbfbec34c8d91a47214858c67e405 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4099 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'swift')
-rw-r--r--swift/1.4.8/plugins/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/swift/1.4.8/plugins/utils.py b/swift/1.4.8/plugins/utils.py
index 59e7047..7a67c1c 100644
--- a/swift/1.4.8/plugins/utils.py
+++ b/swift/1.4.8/plugins/utils.py
@@ -274,8 +274,8 @@ def check_user_xattr(path):
raise
try:
xattr.remove(path, 'user.test.key1')
- except Exception, err:
- logging.exception("xattr.remove failed on %s err: %s", path, str(err))
+ except IOError as err:
+ logging.exception("check_user_xattr: remove failed on %s err: %s", path, str(err))
#Remove xattr may fail in case of concurrent remove.
return True