summaryrefslogtreecommitdiff
path: root/source4/scripting/python/samba/netcmd/setpassword.py
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python/samba/netcmd/setpassword.py')
-rw-r--r--source4/scripting/python/samba/netcmd/setpassword.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/scripting/python/samba/netcmd/setpassword.py b/source4/scripting/python/samba/netcmd/setpassword.py
index 047a95afae..b32b651822 100644
--- a/source4/scripting/python/samba/netcmd/setpassword.py
+++ b/source4/scripting/python/samba/netcmd/setpassword.py
@@ -75,7 +75,6 @@ class cmd_setpassword(Command):
samdb.setpassword(filter, password,
force_change_at_next_login=must_change_at_next_login,
username=username)
- except ldb.LdbError, (num, msg):
- raise CommandError('Failed to set password for user "%s" - %s' %
- (username, msg))
+ except Exception, e:
+ raise CommandError('Failed to set password for user "%s"' % username, e)
print "Changed password OK"