kopia lustrzana https://github.com/glidernet/python-ogn-client
Catch ConnectionResetError (fixes #52)
rodzic
485282ea3b
commit
84dbfdecdb
|
@ -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:
|
||||
|
|
|
@ -59,6 +59,8 @@ class AprsClientTest(unittest.TestCase):
|
|||
'... show must go on',
|
||||
BrokenPipeError(),
|
||||
'... and on',
|
||||
ConnectionResetError(),
|
||||
'... and on',
|
||||
socket.error(),
|
||||
'... and on',
|
||||
'',
|
||||
|
|
Ładowanie…
Reference in New Issue