diff sat/plugins/plugin_xep_0054.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 56f94936df1e
children 003b8b4b56a7
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0054.py	Fri Jan 11 10:18:02 2019 +0100
+++ b/sat/plugins/plugin_xep_0054.py	Fri Jan 11 11:13:15 2019 +0100
@@ -386,7 +386,7 @@
         )
         return d
 
-    def _getCardCb(self, dummy, client, entity):
+    def _getCardCb(self, __, client, entity):
         try:
             return client._cache_0054[entity.full()]["avatar"]
         except KeyError:
@@ -395,7 +395,7 @@
     def _getAvatar(self, entity, cache_only, hash_only, profile):
         client = self.host.getClient(profile)
         d = self.getAvatar(client, jid.JID(entity), cache_only, hash_only)
-        d.addErrback(lambda dummy: "")
+        d.addErrback(lambda __: "")
 
         return d
 
@@ -442,7 +442,7 @@
             if full_path is None:
                 d.addCallback(client.cache.getFilePath)
             else:
-                d.addCallback(lambda dummy: full_path)
+                d.addCallback(lambda __: full_path)
         return d
 
     @defer.inlineCallbacks
@@ -573,7 +573,7 @@
     def getDiscoItems(self, requestor, target, nodeIdentifier=""):
         return []
 
-    def _checkAvatarHash(self, dummy, client, entity, given_hash):
+    def _checkAvatarHash(self, __, client, entity, given_hash):
         """check that hash in cash (i.e. computed hash) is the same as given one"""
         # XXX: if they differ, the avater will be requested on each connection
         # TODO: try to avoid re-requesting avatar in this case