misc: replaced all "dummy" by the more conventional and readable "__" ("_" being used for gettext)
This commit is contained in:
parent
fa0179f87e
commit
7a9ee35cfc
1 changed files with 215 additions and 215 deletions
|
|
@ -289,7 +289,7 @@ class SqliteStorage(object):
|
|||
def setComponent(profile_id):
|
||||
id_ = profile_id[0][0]
|
||||
d_comp = self.dbpool.runQuery("INSERT INTO components(profile_id, entry_point) VALUES (?, ?)", (id_, component))
|
||||
d_comp.addCallback(lambda dummy: profile_id)
|
||||
d_comp.addCallback(lambda __: profile_id)
|
||||
return d_comp
|
||||
|
||||
def profile_created(profile_id):
|
||||
|
|
@ -401,7 +401,7 @@ class SqliteStorage(object):
|
|||
|
||||
## History
|
||||
|
||||
def _addToHistoryCb(self, dummy, data):
|
||||
def _addToHistoryCb(self, __, data):
|
||||
# Message metadata were successfuly added to history
|
||||
# now we can add message and subject
|
||||
uid = data['uid']
|
||||
|
|
@ -409,7 +409,7 @@ class SqliteStorage(object):
|
|||
for lang, value in data[key].iteritems():
|
||||
d = self.dbpool.runQuery("INSERT INTO {key}(history_uid, {key}, language) VALUES (?,?,?)".format(key=key),
|
||||
(uid, value, lang or None))
|
||||
d.addErrback(lambda dummy: log.error(_(u"Can't save following {key} in history (uid: {uid}, lang:{lang}): {value}".format(
|
||||
d.addErrback(lambda __: log.error(_(u"Can't save following {key} in history (uid: {uid}, lang:{lang}): {value}".format(
|
||||
key=key, uid=uid, lang=lang, value=value))))
|
||||
try:
|
||||
thread = data['extra']['thread']
|
||||
|
|
@ -419,7 +419,7 @@ class SqliteStorage(object):
|
|||
thread_parent = data['extra'].get('thread_parent')
|
||||
d = self.dbpool.runQuery("INSERT INTO thread(history_uid, thread_id, parent_id) VALUES (?,?,?)",
|
||||
(uid, thread, thread_parent))
|
||||
d.addErrback(lambda dummy: log.error(_(u"Can't save following thread in history (uid: {uid}): thread:{thread}), parent:{parent}".format(
|
||||
d.addErrback(lambda __: log.error(_(u"Can't save following thread in history (uid: {uid}): thread:{thread}), parent:{parent}".format(
|
||||
uid=uid, thread=thread, parent=thread_parent))))
|
||||
|
||||
def _addToHistoryEb(self, failure_, data):
|
||||
|
|
@ -1362,7 +1362,7 @@ class Updater(object):
|
|||
if rows:
|
||||
log.info("fixing duplicate timestamp")
|
||||
fixed = []
|
||||
for timestamp, dummy in rows:
|
||||
for timestamp, __ in rows:
|
||||
ids_rows = yield self.dbpool.runQuery("SELECT id from history where timestamp=?", (timestamp,))
|
||||
for idx, (id_,) in enumerate(ids_rows):
|
||||
fixed.append(id_)
|
||||
|
|
@ -1486,7 +1486,7 @@ class Updater(object):
|
|||
list_.append(d)
|
||||
|
||||
d_list = defer.DeferredList(list_)
|
||||
d_list.addCallback(lambda dummy: ret)
|
||||
d_list.addCallback(lambda __: ret)
|
||||
return d_list
|
||||
|
||||
def updateLiberviaConf(values):
|
||||
|
|
@ -1507,6 +1507,6 @@ class Updater(object):
|
|||
|
||||
d = self.dbpool.runQuery("SELECT id FROM profiles WHERE name='libervia'")
|
||||
d.addCallback(updateLiberviaConf)
|
||||
d.addCallback(lambda dummy: self.dbpool.runQuery("SELECT profile_id,value FROM param_ind WHERE category=? AND name=?", xmpp_pass_path))
|
||||
d.addCallback(lambda __: self.dbpool.runQuery("SELECT profile_id,value FROM param_ind WHERE category=? AND name=?", xmpp_pass_path))
|
||||
d.addCallback(encrypt_values)
|
||||
return d
|
||||
|
|
|
|||
Loading…
Reference in a new issue