tests: Use .errno instead of .args[0] for OSError exceptions.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -17,7 +17,7 @@ def test(addr, hostname, block=True):
|
||||
s.connect(addr)
|
||||
print("connected")
|
||||
except OSError as e:
|
||||
if e.args[0] != errno.EINPROGRESS:
|
||||
if e.errno != errno.EINPROGRESS:
|
||||
raise
|
||||
print("EINPROGRESS")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user