diff options
author | Douglas Bagnall <douglas.bagnall@catalyst.net.nz> | 2018-02-01 16:08:34 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-02-09 12:34:06 +0100 |
commit | cefb41b0edb273a0095e5bda85c9ce5cc3208fa3 (patch) | |
tree | 30230d2be3dfa9752cce001b00a861df7ba3df4a /python/samba | |
parent | f6f192934c8d170b1786eb2fd09560b7e02b50d4 (diff) | |
download | samba-cefb41b0edb273a0095e5bda85c9ce5cc3208fa3.tar.gz |
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
Diffstat (limited to 'python/samba')
-rw-r--r-- | python/samba/netcmd/drs.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/samba/netcmd/drs.py b/python/samba/netcmd/drs.py index e1886b92d3f..0ccbf9a70da 100644 --- a/python/samba/netcmd/drs.py +++ b/python/samba/netcmd/drs.py @@ -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) |