Skip to content

Commit

Permalink
Make checking of exception type more clear
Browse files Browse the repository at this point in the history
Co-authored-by: ES-Alexander <[email protected]>
  • Loading branch information
2 people authored and patrickelectric committed Nov 26, 2024
1 parent 20b343c commit 3bc630e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/pingproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def run(self):
self.clients[address].parse(data)

except Exception as e:
if hasattr(e, 'errno') and e.errno == errno.EAGAIN:
if isinstance(e, OSError) and e.errno == errno.EAGAIN:
pass # waiting for data
else:
print("Error reading data", e)
Expand Down

0 comments on commit 3bc630e

Please sign in to comment.