mirror of
https://github.com/sshuttle/sshuttle.git
synced 2024-11-25 09:23:48 +01:00
Don't crash if we can't look up peername
Peername is only used for information display messages. Fixes #259
This commit is contained in:
parent
7b6f082454
commit
0dba8a8beb
@ -95,6 +95,8 @@ def _try_peername(sock):
|
||||
_, e = sys.exc_info()[:2]
|
||||
if e.args[0] not in (errno.ENOTCONN, errno.ENOTSOCK):
|
||||
raise
|
||||
except AttributeError:
|
||||
pass
|
||||
return 'unknown'
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user