From ba2057a2c6da7f65960a44d6f6d88a3f1457c6a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 21 Jun 2017 05:03:04 +0200 Subject: [PATCH] events: improve handling qubesd restart qubesd may be restarted during different stages of connection - either while attempting to connect, or while already listening on events. Adjust exception list accordingly. This is especially important for qvm-start-gui - otherwise it crashes on qubesd restart. --- qubesadmin/events/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qubesadmin/events/__init__.py b/qubesadmin/events/__init__.py index e44e6f3..ae35005 100644 --- a/qubesadmin/events/__init__.py +++ b/qubesadmin/events/__init__.py @@ -118,7 +118,8 @@ class EventsDispatcher(object): while True: try: yield from self._listen_for_events(vm) - except ConnectionRefusedError: + except (ConnectionRefusedError, ConnectionResetError, + FileNotFoundError): pass if not reconnect: break