Verified Commit 385ba008 by Tulio Casagrande Committed by meskio

[bug] remove key generation event from regenerate_key

The KEYMANAGER_FINISHED_KEY_GENERATION event is used to send a welcome
mail to the users, which was causing a new welcome mail when
regenerating a key. We removed the event from regenerate_key method.

We should implement a KEYMANAGER_FINISHED_KEY_REGENERATION event when
it's needed.
parent 3a9c3ca2
......@@ -370,17 +370,10 @@ class KeyManager(object):
:rtype: Deferred
"""
def signal_finished(key):
emit_async(
catalog.KEYMANAGER_FINISHED_KEY_GENERATION, self._address)
return key
self.log.info('Regenerating key for %s.' % self._address)
emit_async(catalog.KEYMANAGER_STARTED_KEY_GENERATION, self._address)
new_key = yield self._openpgp.regenerate_key(self._address)
yield self._openpgp.reset_all_keys_sign_used()
emit_async(
catalog.KEYMANAGER_FINISHED_KEY_GENERATION, self._address)
defer.returnValue(new_key)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment