mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
samba python libs: convert 'except X, (tuple)' to 'except X as e'
In addition to converting the except line another line is also added for each except to extract the tuple contents. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Douglas Bagnall
parent
efad273122
commit
91a5941f17
@ -107,7 +107,8 @@ def delete_site(samdb, configDn, siteName):
|
||||
expression="objectClass=site")
|
||||
if len(ret) != 1:
|
||||
raise SiteNotFoundException('Site %s does not exist' % siteName)
|
||||
except LdbError as (enum, estr):
|
||||
except LdbError as e:
|
||||
(enum, estr) = e.args
|
||||
if enum == ldb.ERR_NO_SUCH_OBJECT:
|
||||
raise SiteNotFoundException('Site %s does not exist' % siteName)
|
||||
|
||||
|
Reference in New Issue
Block a user