diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-02-14 10:18:36 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-02-15 00:18:30 +0100 |
commit | 4885937bf87e6c37c60cda890dc18d46b5868a91 (patch) | |
tree | 0802ebd0f6086dbf2a81d3882a34181858264493 /python/samba/drs_utils.py | |
parent | a485ac32438b74315ffd4a7188909f00e175d4fa (diff) | |
download | samba-4885937bf87e6c37c60cda890dc18d46b5868a91.tar.gz |
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>
Diffstat (limited to 'python/samba/drs_utils.py')
-rw-r--r-- | python/samba/drs_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py index ded072ca4f6..1940d2d1b27 100644 --- a/python/samba/drs_utils.py +++ b/python/samba/drs_utils.py @@ -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) |