From 2b8043986e6f35a91bf1919c657d73f67b905ef7 Mon Sep 17 00:00:00 2001 From: Peter Portante Date: Wed, 17 Oct 2012 15:25:34 -0400 Subject: 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 Reviewed-on: http://review.gluster.org/4099 Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati Tested-by: Anand Avati --- swift/1.4.8/plugins/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'swift/1.4.8/plugins/utils.py') diff --git a/swift/1.4.8/plugins/utils.py b/swift/1.4.8/plugins/utils.py index 59e704702..7a67c1cb6 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 -- cgit