misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)

This commit is contained in:
Goffi 2019-01-11 11:13:15 +01:00
commit 7a9ee35cfc

View file

@ -386,7 +386,7 @@ class XEP_0054(object):
)
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 @@ class XEP_0054(object):
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 @@ class XEP_0054(object):
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 @@ class XEP_0054_handler(XMPPHandler):
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