mirror of
https://github.com/samba-team/samba.git
synced 2025-07-16 20:59:12 +03:00
samba python libs: convert 'except X, e' to 'except X as e'
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
a485ac3243
commit
4885937bf8
@ -54,7 +54,7 @@ def drsuapi_connect(server, lp, creds):
|
||||
try:
|
||||
drsuapiBind = drsuapi.drsuapi(binding_string, lp, creds)
|
||||
(drsuapiHandle, bindSupportedExtensions) = drs_DsBind(drsuapiBind)
|
||||
except Exception, e:
|
||||
except Exception as e:
|
||||
raise drsException("DRS connection to %s failed: %s" % (server, e))
|
||||
|
||||
return (drsuapiBind, drsuapiHandle, bindSupportedExtensions)
|
||||
@ -83,7 +83,7 @@ def sendDsReplicaSync(drsuapiBind, drsuapi_handle, source_dsa_guid,
|
||||
|
||||
try:
|
||||
drsuapiBind.DsReplicaSync(drsuapi_handle, 1, req1)
|
||||
except Exception, estr:
|
||||
except Exception as estr:
|
||||
raise drsException("DsReplicaSync failed %s" % estr)
|
||||
|
||||
|
||||
@ -106,7 +106,7 @@ def sendRemoveDsServer(drsuapiBind, drsuapi_handle, server_dsa_dn, domain):
|
||||
req1.commit = 1
|
||||
|
||||
drsuapiBind.DsRemoveDSServer(drsuapi_handle, 1, req1)
|
||||
except Exception, estr:
|
||||
except Exception as estr:
|
||||
raise drsException("DsRemoveDSServer failed %s" % estr)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user