Skip to content

Commit 56cbe2c

Browse files
matburnhamMeisterschueler
authored andcommitted
More helpful socket error message
1 parent a855bab commit 56cbe2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ogn/client/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ def run(self, callback, timed_callback=lambda client: None, autoreconnect=False,
9494
break
9595

9696
callback(packet_str, **kwargs)
97-
except socket.error:
98-
self.logger.error('socket.error')
97+
except (socket.error, ConnectionError) as e:
98+
self.logger.error('Connect error: {}'.format(e))
9999
except OSError:
100100
self.logger.error('OSError')
101101
except UnicodeDecodeError:

0 commit comments

Comments
 (0)