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/extmod/websocket_basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/extmod/websocket_basic.py') diff --git a/tests/extmod/websocket_basic.py b/tests/extmod/websocket_basic.py index 10396e914..a07542f96 100644 --- a/tests/extmod/websocket_basic.py +++ b/tests/extmod/websocket_basic.py @@ -59,4 +59,4 @@ print(ws.ioctl(9)) try: ws.ioctl(-1) except OSError as e: - print("ioctl: EINVAL:", e.args[0] == uerrno.EINVAL) + print("ioctl: EINVAL:", e.errno == uerrno.EINVAL) -- cgit v1.2.3