Browse Source

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
Marek Marczykowski-Górecki 6 years ago
parent
commit
7b9ee45c07
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubesadmin/__init__.py

+ 1 - 1
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