app: fix error reporting when connection to qubesd fails
Properly report QubesDaemonCommunicationError, instead of confusing IOError or FileNotFoundError
This commit is contained in:
parent
86a4f59fd4
commit
a481490d60
@ -471,9 +471,9 @@ class QubesLocal(QubesBase):
|
|||||||
try:
|
try:
|
||||||
client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
client_socket.connect(qubesadmin.config.QUBESD_SOCKET)
|
client_socket.connect(qubesadmin.config.QUBESD_SOCKET)
|
||||||
except IOError:
|
except (IOError, OSError) as e:
|
||||||
# TODO:
|
raise qubesadmin.exc.QubesDaemonCommunicationError(
|
||||||
raise
|
'Failed to connect to qubesd service: %s', str(e))
|
||||||
|
|
||||||
# src, method, dest, arg
|
# src, method, dest, arg
|
||||||
for call_arg in ('dom0', method, dest, arg):
|
for call_arg in ('dom0', method, dest, arg):
|
||||||
|
Loading…
Reference in New Issue
Block a user