mirror of
https://github.com/samba-team/samba.git
synced 2025-12-17 04:23:50 +03:00
sambatool drs showrepl: prefer self over ctx in python classes
and the line length too. (Now only python/samba/join.py uses ctx for self, but at least it does it consistently. This was the only ctx function in the class). Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Feb 9 12:34:06 CET 2018 on sn-devel-144
This commit is contained in:
committed by
Andrew Bartlett
parent
f6f192934c
commit
cefb41b0ed
@@ -112,13 +112,14 @@ class cmd_drs_showrepl(Command):
|
||||
self.message("\t\tLast success @ %s" % nttime2string(n.last_success))
|
||||
self.message("")
|
||||
|
||||
def drsuapi_ReplicaInfo(ctx, info_type):
|
||||
def drsuapi_ReplicaInfo(self, info_type):
|
||||
'''call a DsReplicaInfo'''
|
||||
|
||||
req1 = drsuapi.DsReplicaGetInfoRequest1()
|
||||
req1.info_type = info_type
|
||||
try:
|
||||
(info_type, info) = ctx.drsuapi.DsReplicaGetInfo(ctx.drsuapi_handle, 1, req1)
|
||||
(info_type, info) = self.drsuapi.DsReplicaGetInfo(
|
||||
self.drsuapi_handle, 1, req1)
|
||||
except Exception, e:
|
||||
raise CommandError("DsReplicaGetInfo of type %u failed" % info_type, e)
|
||||
return (info_type, info)
|
||||
|
||||
Reference in New Issue
Block a user