diff options
| author | Andrew Tridgell <tridge@samba.org> | 2010-11-29 14:15:57 +1100 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2010-11-29 18:04:42 +1100 |
| commit | 37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6 (patch) | |
| tree | e44efedee115beac377d1fc9ab3a22c5e6cc2cee /source4/scripting/python/samba/netcmd/ntacl.py | |
| parent | 62506903101e8e8e1cfc6c70fee245f97c646844 (diff) | |
| download | samba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.tar.gz samba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.tar.bz2 samba-37bfc4ec384df71a4cb1c19ceb136fecd3b9afc6.zip | |
s4-samba-tool: fixed exception handling in subcommands
this switches to the new pattern of:
except Exception, e:
raise CommandError("some error message", e)
Diffstat (limited to 'source4/scripting/python/samba/netcmd/ntacl.py')
| -rw-r--r-- | source4/scripting/python/samba/netcmd/ntacl.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/netcmd/ntacl.py b/source4/scripting/python/samba/netcmd/ntacl.py index 83656587612..49f8fbc77f0 100644 --- a/source4/scripting/python/samba/netcmd/ntacl.py +++ b/source4/scripting/python/samba/netcmd/ntacl.py @@ -65,9 +65,8 @@ class cmd_acl_set(Command): try: ldb = Ldb(path, session_info=system_session(), credentials=creds, lp=lp) - except: - # XXX: Should catch a particular exception type - raise CommandError("Unable to read domain SID from configuration files") + except Exception, e: + raise CommandError("Unable to read domain SID from configuration files", e) attrs = ["objectSid"] print lp.get("realm") res = ldb.search(expression="(objectClass=*)", |
