summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2015-05-07 11:21:02 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-05-27 12:04:29 -0300
commit5a0de9fd25d783039345674680c67a2bd91815a5 (patch)
treeec1f07453effdd27b825510a9782c6de11f241ae /src/leap/bitmask/crypto
parent9515c944279e08221de1852ab373d24232dccbf1 (diff)
[feat] adapt to new events api on common
- Related: #6359
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index fe177e5a..1e96030e 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -37,8 +37,8 @@ from leap.bitmask.util import request_helpers as reqhelper
from leap.bitmask.util.compat import requests_has_max_retries
from leap.bitmask.util.constants import REQUEST_TIMEOUT
from leap.common.check import leap_assert
-from leap.common.events import signal as events_signal
-from leap.common.events import events_pb2 as proto
+from leap.common.events import emit, catalog
+
logger = logging.getLogger(__name__)
@@ -395,9 +395,7 @@ class SRPAuthImpl(object):
(json_content,))
raise SRPAuthBadDataFromServer()
- events_signal(
- proto.CLIENT_UID, content=uuid,
- reqcbk=lambda req, res: None) # make the rpc call async
+ emit(catalog.CLIENT_UID, uuid) # make the rpc call async
return M2
@@ -433,9 +431,8 @@ class SRPAuthImpl(object):
logger.error("Bad cookie from server (missing _session_id)")
raise SRPAuthNoSessionId()
- events_signal(
- proto.CLIENT_SESSION_ID, content=session_id,
- reqcbk=lambda req, res: None) # make the rpc call asynch
+ # make the rpc call async
+ emit(catalog.CLIENT_SESSION_ID, session_id)
self.set_session_id(session_id)
logger.debug("SUCCESS LOGIN")