events: simplify handling qubesd reconnect

Retry connection on any OSError, instead of only few selected error
types. For example PermissionError may happen too (when socket is
created, but before it gets appropriate mode), which wasn't listed.
This commit is contained in:
Marek Marczykowski-Górecki 2019-02-24 05:32:51 +01:00
parent 1145f70334
commit 88ab55b940
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -124,9 +124,7 @@ class EventsDispatcher(object):
while True:
try:
yield from self._listen_for_events(vm)
except (ConnectionRefusedError, ConnectionResetError,
FileNotFoundError,
qubesadmin.exc.QubesDaemonCommunicationError):
except (OSError, qubesadmin.exc.QubesDaemonCommunicationError):
pass
if not reconnect:
break