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/accept_nonblock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/net_hosted/accept_nonblock.py') diff --git a/tests/net_hosted/accept_nonblock.py b/tests/net_hosted/accept_nonblock.py index 941965e178..d17e287498 100644 --- a/tests/net_hosted/accept_nonblock.py +++ b/tests/net_hosted/accept_nonblock.py @@ -12,5 +12,5 @@ s.listen(1) try: s.accept() except OSError as er: - print(er.args[0] == 11) # 11 is EAGAIN + print(er.errno == 11) # 11 is EAGAIN s.close() -- cgit v1.2.3