Mercurial > libervia-web
comparison libervia/pages/g/page_meta.py @ 1506:ce879da7fcf7
server: fix `on_signal` callback
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 23 Mar 2023 17:50:54 +0100 |
parents | 6f342b36871c |
children | 106bae41f5c8 |
comparison
equal
deleted
inserted
replaced
1505:a169cbc315f0 | 1506:ce879da7fcf7 |
---|---|
20 try: | 20 try: |
21 invitation_id = self.nextPath(request) | 21 invitation_id = self.nextPath(request) |
22 except IndexError: | 22 except IndexError: |
23 self.pageError(request) | 23 self.pageError(request) |
24 | 24 |
25 sat_session, guest_session = self.host.getSessionData( | 25 web_session, guest_session = self.host.getSessionData( |
26 request, session_iface.ISATSession, session_iface.ISATGuestSession | 26 request, session_iface.IWebSession, session_iface.ISATGuestSession |
27 ) | 27 ) |
28 current_id = guest_session.id | 28 current_id = guest_session.id |
29 | 29 |
30 if current_id is not None and current_id != invitation_id: | 30 if current_id is not None and current_id != invitation_id: |
31 log.info( | 31 log.info( |
32 _( | 32 _( |
33 "killing guest session [{old_id}] because it is connecting with an other ID [{new_id}]" | 33 "killing guest session [{old_id}] because it is connecting with an other ID [{new_id}]" |
34 ).format(old_id=current_id, new_id=invitation_id) | 34 ).format(old_id=current_id, new_id=invitation_id) |
35 ) | 35 ) |
36 self.host.purgeSession(request) | 36 self.host.purgeSession(request) |
37 sat_session, guest_session = self.host.getSessionData( | 37 web_session, guest_session = self.host.getSessionData( |
38 request, session_iface.ISATSession, session_iface.ISATGuestSession | 38 request, session_iface.IWebSession, session_iface.ISATGuestSession |
39 ) | 39 ) |
40 current_id = None # FIXME: id not reset here | 40 current_id = None # FIXME: id not reset here |
41 profile = None | 41 profile = None |
42 | 42 |
43 profile = sat_session.profile | 43 profile = web_session.profile |
44 if profile is not None and current_id is None: | 44 if profile is not None and current_id is None: |
45 log.info( | 45 log.info( |
46 _( | 46 _( |
47 "killing current profile session [{profile}] because a guest id is used" | 47 "killing current profile session [{profile}] because a guest id is used" |
48 ).format(profile=profile) | 48 ).format(profile=profile) |
49 ) | 49 ) |
50 self.host.purgeSession(request) | 50 self.host.purgeSession(request) |
51 sat_session, guest_session = self.host.getSessionData( | 51 web_session, guest_session = self.host.getSessionData( |
52 request, session_iface.ISATSession, session_iface.ISATGuestSession | 52 request, session_iface.IWebSession, session_iface.ISATGuestSession |
53 ) | 53 ) |
54 profile = None | 54 profile = None |
55 | 55 |
56 if current_id is None: | 56 if current_id is None: |
57 log.debug(_("checking invitation [{id}]").format(id=invitation_id)) | 57 log.debug(_("checking invitation [{id}]").format(id=invitation_id)) |