From 7b9ee45c0791d8368a0bb8af52652d3fcd482c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 18 Jul 2017 01:58:33 +0200 Subject: [PATCH] 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 --- qubesadmin/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubesadmin/__init__.py b/qubesadmin/__init__.py index 2a9b1fc..2cbcfc7 100644 --- a/qubesadmin/__init__.py +++ b/qubesadmin/__init__.py @@ -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