tests: Fall back if there's no seat_id for the current session_id
Such as in an ssh login. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3875 Fixes: 98b347b204 ("dbusmock/logind: Mock logind and remove KVM special handling") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4299>
This commit is contained in:
parent
b2c5d441c9
commit
df555f4828
@ -159,13 +159,17 @@ def GetSessionByPID(self, pid):
|
||||
return session_path
|
||||
|
||||
def create_session(self, host_bus):
|
||||
session_id = 'dummy'
|
||||
seat_id = 'seat0'
|
||||
session_id = None
|
||||
seat_id = None
|
||||
|
||||
if host_bus:
|
||||
session_id = find_host_session_id(host_bus)
|
||||
seat_id = find_host_seat_id(host_bus, session_id)
|
||||
|
||||
if not seat_id:
|
||||
session_id = 'dummy'
|
||||
seat_id = 'seat0'
|
||||
|
||||
if not self.preferred_session_id or host_bus:
|
||||
self.preferred_session_id = session_id
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user