comparison src/pages/g/page_meta.py @ 1098:01e95ec9df9e

server, pages: fixed blocking calls to bridge by using bridgeCall instead
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 15:09:19 +0200
parents 5cdd77190a3b
children 5976dcd42591
comparison
equal deleted inserted replaced
1097:f134c0ecb1d5 1098:01e95ec9df9e
44 profile = None 44 profile = None
45 45
46 if current_id is None: 46 if current_id is None:
47 log.debug(_(u"checking invitation [{id}]").format(id=invitation_id)) 47 log.debug(_(u"checking invitation [{id}]").format(id=invitation_id))
48 try: 48 try:
49 data = yield self.host.bridge.invitationGet(invitation_id) 49 data = yield self.host.bridgeCall("invitationGet", invitation_id)
50 except Exception: 50 except Exception:
51 self.pageError(request, C.HTTP_UNAUTHORIZED) 51 self.pageError(request, C.HTTP_UNAUTHORIZED)
52 else: 52 else:
53 guest_session.id = invitation_id 53 guest_session.id = invitation_id
54 guest_session.data = data 54 guest_session.data = data
59 log.debug(_(u"connecting profile [{}]").format(profile)) 59 log.debug(_(u"connecting profile [{}]").format(profile))
60 # we need to connect the profile 60 # we need to connect the profile
61 profile = data['guest_profile'] 61 profile = data['guest_profile']
62 password = data['password'] 62 password = data['password']
63 try: 63 try:
64 yield self.host.bridge.connect(profile, password, {}) 64 yield self.host.bridgeCall("connect", profile, password, {})
65 except Exception as e: 65 except Exception as e:
66 log.warning(_(u"Can't connect profile: {msg}").format( 66 log.warning(_(u"Can't connect profile: {msg}").format(
67 msg=e)) 67 msg=e))
68 # FIXME: no good error code correspond 68 # FIXME: no good error code correspond
69 # maybe use a custom one? 69 # maybe use a custom one?