Catch ConnectionResetError (fixes #52)

pull/62/head
Konstantin Gründger 2018-09-18 18:35:44 +02:00
rodzic 485282ea3b
commit 84dbfdecdb
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -72,8 +72,8 @@ class AprsClient:
break
callback(packet_str)
except BrokenPipeError:
self.logger.error('BrokenPipeError', exc_info=True)
except ConnectionError:
self.logger.error('ConnectionError', exc_info=True)
except socket.error:
self.logger.error('socket.error', exc_info=True)
except UnicodeDecodeError:

Wyświetl plik

@ -59,6 +59,8 @@ class AprsClientTest(unittest.TestCase):
'... show must go on',
BrokenPipeError(),
'... and on',
ConnectionResetError(),
'... and on',
socket.error(),
'... and on',
'',