events: try reconnecting to qubesd also on BrokenPipeError

When qubesd exits while writing to it, not reading, the error is
BrokenPipe, not EOF. Handle it the same.
This commit is contained in:
Marek Marczykowski-Górecki 2018-10-07 02:46:28 +02:00
parent 0dfdab32e1
commit e7bc8f21d5
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -173,6 +173,8 @@ class EventsDispatcher(object):
value = (yield from reader.readuntil(b'\0'))[:-1].\
decode('utf-8')
kwargs[key] = value
except BrokenPipeError:
break
except asyncio.IncompleteReadError as err:
if err.partial == b'':
break