From: Douglas Bagnall Date: Thu, 1 Feb 2018 03:08:34 +0000 (+1300) Subject: sambatool drs showrepl: prefer self over ctx in python classes X-Git-Tag: tevent-0.9.36~178 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cefb41b0edb273a0095e5bda85c9ce5cc3208fa3;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Fri Feb 9 12:34:06 CET 2018 on sn-devel-144 --- 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)