From 37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Nov 2010 14:15:57 +1100 Subject: s4-samba-tool: fixed exception handling in subcommands this switches to the new pattern of: except Exception, e: raise CommandError("some error message", e) --- source4/scripting/python/samba/ntacls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/scripting/python/samba/ntacls.py') diff --git a/source4/scripting/python/samba/ntacls.py b/source4/scripting/python/samba/ntacls.py index 0667a5199c0..78365e98b85 100644 --- a/source4/scripting/python/samba/ntacls.py +++ b/source4/scripting/python/samba/ntacls.py @@ -51,7 +51,7 @@ def getntacl(lp, file, backend=None, eadbfile=None): try: attribute = samba.xattr_tdb.wrap_getxattr(eadbname, file, xattr.XATTR_NTACL_NAME) - except: + except Exception: # FIXME: Don't catch all exceptions, just those related to opening # xattrdb print "Fail to open %s" % eadbname @@ -75,7 +75,7 @@ def setntacl(lp, file, sddl, domsid, backend=None, eadbfile=None): try: samba.xattr_tdb.wrap_setxattr(eadbname, file, xattr.XATTR_NTACL_NAME, ndr_pack(ntacl)) - except: + except Exception: # FIXME: Don't catch all exceptions, just those related to opening # xattrdb print "Fail to open %s" % eadbname -- cgit v1.2.3