sambatool drs showrepl: prefer self over ctx in python classes
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 1 Feb 2018 03:08:34 +0000 (16:08 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 9 Feb 2018 11:34:06 +0000 (12:34 +0100)
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

python/samba/netcmd/drs.py

index e1886b92d3f0b542ed4e703744e04bac43409362..0ccbf9a70daa858b994f18c75838785662cde325 100644 (file)
@@ -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)