From 3123f6918ba18b0a3f7a89500b450f4cb15e1aee Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 22 Apr 2021 19:32:21 +1000 Subject: tests: Use .errno instead of .args[0] for OSError exceptions. Signed-off-by: Damien George --- tests/net_hosted/connect_nonblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/net_hosted/connect_nonblock.py') diff --git a/tests/net_hosted/connect_nonblock.py b/tests/net_hosted/connect_nonblock.py index c024b65a0a..4b8055c161 100644 --- a/tests/net_hosted/connect_nonblock.py +++ b/tests/net_hosted/connect_nonblock.py @@ -13,7 +13,7 @@ def test(peer_addr): try: s.connect(peer_addr) except OSError as er: - print(er.args[0] == errno.EINPROGRESS) + print(er.errno == errno.EINPROGRESS) s.close() -- cgit v1.2.3