Skip to content

Commit 3bc630e

Browse files
wtsnyderES-Alexander
authored andcommitted
Make checking of exception type more clear
Co-authored-by: ES-Alexander <sandman.esalexander@gmail.com>
1 parent 20b343c commit 3bc630e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/pingproxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def run(self):
7373
self.clients[address].parse(data)
7474

7575
except Exception as e:
76-
if hasattr(e, 'errno') and e.errno == errno.EAGAIN:
76+
if isinstance(e, OSError) and e.errno == errno.EAGAIN:
7777
pass # waiting for data
7878
else:
7979
print("Error reading data", e)

0 commit comments

Comments
 (0)