git.samba.org
/
vlendec
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0e7303
)
s4-samba-tool: give a bit better error on user delete failure
author
Andrew Tridgell
<tridge@samba.org>
Fri, 1 Apr 2011 04:59:15 +0000
(15:59 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 4 Apr 2011 00:30:30 +0000
(10:30 +1000)
source4/scripting/python/samba/netcmd/user.py
patch
|
blob
|
history
diff --git
a/source4/scripting/python/samba/netcmd/user.py
b/source4/scripting/python/samba/netcmd/user.py
index bbc972bcc7e488c570adb65a125f13ffc041d7e1..a5750b50107ce16f6ef034bf57fc6a10fd093c9d 100644
(file)
--- a/
source4/scripting/python/samba/netcmd/user.py
+++ b/
source4/scripting/python/samba/netcmd/user.py
@@
-24,6
+24,7
@@
from samba.net import Net
from samba.netcmd import (
Command,
+ CommandError,
SuperCommand,
)
@@
-64,7
+65,10
@@
class cmd_user_delete(Command):
lp = sambaopts.get_loadparm()
creds = credopts.get_credentials(lp, fallback_machine=True)
net = Net(creds, lp, server=credopts.ipaddress)
- net.delete_user(name)
+ try:
+ net.delete_user(name)
+ except RuntimeError, msg:
+ raise CommandError("Failed to delete user %s: %s" % (name, msg))
class cmd_user(SuperCommand):