Ver código fonte

Improve QubesDaemonNoResponseError error message

Include hint to look into dom0 logs

QubesOS/qubes-issues#3016
Marek Marczykowski-Górecki 6 anos atrás
pai
commit
5b7947b51a
3 arquivos alterados com 5 adições e 3 exclusões
  1. 2 1
      qubesadmin/base.py
  2. 1 1
      qubesadmin/exc.py
  3. 2 1
      qubesadmin/tests/errors.py

+ 2 - 1
qubesadmin/base.py

@@ -79,7 +79,8 @@ class PropertyHolder(object):
 
         if response_data == b'':
             raise qubesadmin.exc.QubesDaemonNoResponseError(
-                'Got empty response from qubesd')
+                'Got empty response from qubesd. See journalctl in dom0 for '
+                'details.')
 
         if response_data[0:2] == b'\x30\x00':
             return response_data[2:]

+ 1 - 1
qubesadmin/exc.py

@@ -126,7 +126,7 @@ class StoragePoolException(QubesException):
 
 class QubesDaemonCommunicationError(QubesException, IOError):
     '''Error while communicating with qubesd, may mean insufficient
-    permissions, as well'''
+    permissions as well'''
 
 
 class DeviceAlreadyAttached(QubesException, KeyError):

+ 2 - 1
qubesadmin/tests/errors.py

@@ -56,4 +56,5 @@ class TC_00_Errors(qubesadmin.tests.QubesTestCase):
                 as context:
             vms = list(self.app.domains)
         self.assertEqual(str(context.exception),
-            'Got empty response from qubesd')
+            'Got empty response from qubesd. '
+            'See journalctl in dom0 for details.')