mirror of
https://github.com/samba-team/samba.git
synced 2025-07-08 16:59:09 +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:
@ -91,7 +91,6 @@ class cmd_newuser(Command):
|
||||
jobtitle=job_title, department=department, company=company, description=description,
|
||||
mailaddress=mail_address, internetaddress=internet_address,
|
||||
telephonenumber=telephone_number, physicaldeliveryoffice=physical_delivery_office)
|
||||
except ldb.LdbError, (num, msg):
|
||||
raise CommandError('Failed to create user "%s" : %s' % (
|
||||
username, msg))
|
||||
except Exception, e:
|
||||
raise CommandError('Failed to create user "%s"' % username, e)
|
||||
|
||||
|
Reference in New Issue
Block a user