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>
This commit is contained in:
Peter Portante 2012-10-17 15:25:34 -04:00 committed by Anand Avati
parent dbe793bcde
commit 2b8043986e

View File

@ -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