Choose QubesLocal or QubesRemote based on /etc/qubes-release presence

Do not check for qubesd socket (at module import time), because if not
running at this precise time, it will lead to wrong choice. And a weird
error message in consequence (looking for qrexec-client-vm in dom0).

Fixes QubesOS/qubes-issues#2917
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-18 01:58:33 +02:00
parent 0c0b625a70
commit 7b9ee45c07
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -28,7 +28,7 @@ import qubesadmin.app
DEFAULT = qubesadmin.base.DEFAULT
if os.path.exists(qubesadmin.config.QUBESD_SOCKET):
if os.path.exists('/etc/qubes-release'):
Qubes = qubesadmin.app.QubesLocal
else:
Qubes = qubesadmin.app.QubesRemote