set_soledad_invalid_auth_token receives too few arguments
ivan reports the following error with the deb for vivid:
[2015-11-05 17:16:48] INFO - L#455 : twisted.python.log:emit - processing doclist [2015-11-05 17:16:48] DEBUG - L#282 : leap.mail.incoming.service:_process_doclist - no docs found ERROR:tornado.application:Exception in callback Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/zmq/eventloop/minitornado/ioloop.py", line 463, in _run_callback callback() File "/usr/lib/python2.7/dist-packages/zmq/eventloop/minitornado/stack_context.py", line 331, in wrapped raise_exc_info(exc) File "/usr/lib/python2.7/dist-packages/zmq/eventloop/minitornado/stack_context.py", line 302, in wrapped ret = fn(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/leap/common/events/client.py", line 398, in self._loop.add_callback(lambda: callback(event, *content)) TypeError: set_soledad_invalid_auth_token() takes exactly 3 arguments (2 given)
I think the signature for the slot that receives the signal is wrong.
In mail we emit the event without arguments:
4 def _signal_invalid_auth(failure): 3 failure.trap(InvalidAuthTokenError) 2 # if the token is invalid, send an event so the GUI can 1 # disable mail and show an error message. 0 emit_async(catalog.SOLEDAD_INVALID_AUTH_TOKEN)
but the callback expects content to be passed:
def set_soledad_invalid_auth_token(self, event, content):
I think a simple fix is to convert content in a default argument (so we can pass something in the future, like a timestamp).
(from redmine: created on 2015-11-05, duplicates #7598 (closed))