mirror of
https://github.com/samba-team/samba.git
synced 2025-07-27 07:42:04 +03:00
s4-samba-tool: fixed exception handling in subcommands
this switches to the new pattern of: except Exception, e: raise CommandError("some error message", e)
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user