summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2016-09-26 16:20:08 -0300
committerdrebs <drebs@riseup.net>2016-09-30 13:09:58 -0300
commit529395ffdd2a3f5d6722c419c56d68dd2bc64976 (patch)
tree1ff0a96dba21c908e84b8f155dd5f39159b129ac /src
parent10b0b4462107ecebffab4ce3eb0435d3c1b2dd24 (diff)
[style] use a more meaningful callback name
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/core/mail_services.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/bitmask/core/mail_services.py b/src/leap/bitmask/core/mail_services.py
index e19b719..04306b4 100644
--- a/src/leap/bitmask/core/mail_services.py
+++ b/src/leap/bitmask/core/mail_services.py
@@ -286,7 +286,7 @@ class KeymanagerContainer(Container):
return failure
return log_error
- def _maybe_sync(ever_synced):
+ def _sync_if_never_synced(ever_synced):
if ever_synced:
log.msg("soledad has synced in the past")
return defer.succeed(None)
@@ -296,7 +296,7 @@ class KeymanagerContainer(Container):
if not keymanager.token:
log.msg("no token to sync now, scheduling a new check")
d = task.deferLater(reactor, 5, keymanager.ever_synced)
- d.addCallback(_maybe_sync)
+ d.addCallback(_sync_if_never_synced)
return d
log.msg("syncing soledad for the first time...")
@@ -304,7 +304,7 @@ class KeymanagerContainer(Container):
log.msg("checking if soledad has ever synced...")
d = keymanager.ever_synced()
- d.addCallback(_maybe_sync)
+ d.addCallback(_sync_if_never_synced)
d.addCallback(_get_key)
d.addCallbacks(_found_key, _if_not_found_generate)
d.addCallback(lambda _: keymanager)