diff sat_frontends/bridge/pb.py @ 2765:378188abe941

misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
author Goffi <goffi@goffi.org>
date Fri, 11 Jan 2019 11:13:15 +0100
parents e347e32aa07f
children 003b8b4b56a7
line wrap: on
line diff
--- a/sat_frontends/bridge/pb.py	Fri Jan 11 10:18:02 2019 +0100
+++ b/sat_frontends/bridge/pb.py	Fri Jan 11 11:13:15 2019 +0100
@@ -119,7 +119,7 @@
         reactor.connectTCP("localhost", 8789, factory)
         d = factory.getRootObject()
         d.addCallback(self._set_root)
-        d.addCallback(lambda dummy: callback())
+        d.addCallback(lambda __: callback())
         d.addErrback(errback)
 
     def register_signal(self, functionName, handler, iface="core"):
@@ -137,7 +137,7 @@
     def addContact(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("addContact", entity_jid, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -145,7 +145,7 @@
     def asyncDeleteProfile(self, profile, callback=None, errback=None):
         d = self.root.callRemote("asyncDeleteProfile", profile)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -177,7 +177,7 @@
     def delContact(self, entity_jid, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("delContact", entity_jid, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -209,7 +209,7 @@
     def disconnect(self, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("disconnect", profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -329,7 +329,7 @@
     def getReady(self, callback=None, errback=None):
         d = self.root.callRemote("getReady")
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -417,7 +417,7 @@
     def messageEncryptionStart(self, to_jid, namespace='', replace=False, profile_key="@NONE@", callback=None, errback=None):
         d = self.root.callRemote("messageEncryptionStart", to_jid, namespace, replace, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -425,7 +425,7 @@
     def messageEncryptionStop(self, to_jid, profile_key, callback=None, errback=None):
         d = self.root.callRemote("messageEncryptionStop", to_jid, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -433,7 +433,7 @@
     def messageSend(self, to_jid, message, subject={}, mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):
         d = self.root.callRemote("messageSend", to_jid, message, subject, mess_type, extra, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -449,7 +449,7 @@
     def paramsRegisterApp(self, xml, security_limit=-1, app='', callback=None, errback=None):
         d = self.root.callRemote("paramsRegisterApp", xml, security_limit, app)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -457,7 +457,7 @@
     def profileCreate(self, profile, password='', component='', callback=None, errback=None):
         d = self.root.callRemote("profileCreate", profile, password, component)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -481,7 +481,7 @@
     def profileSetDefault(self, profile, callback=None, errback=None):
         d = self.root.callRemote("profileSetDefault", profile)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -545,7 +545,7 @@
     def setParam(self, name, value, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("setParam", name, value, category, security_limit, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -553,7 +553,7 @@
     def setPresence(self, to_jid='', show='', statuses={}, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("setPresence", to_jid, show, statuses, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -561,7 +561,7 @@
     def subscription(self, sub_type, entity, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("subscription", sub_type, entity, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)
@@ -569,7 +569,7 @@
     def updateContact(self, entity_jid, name, groups, profile_key="@DEFAULT@", callback=None, errback=None):
         d = self.root.callRemote("updateContact", entity_jid, name, groups, profile_key)
         if callback is not None:
-            d.addCallback(lambda dummy: callback())
+            d.addCallback(lambda __: callback())
         if errback is None:
             errback = self._generic_errback
         d.addErrback(errback)