diff options
author | Damien George <damien@micropython.org> | 2021-04-20 17:12:08 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-04-23 22:03:46 +1000 |
commit | 342d55529d6f3312fc158d7af005f56d5e30adef (patch) | |
tree | b94876ca6916490ab7c5b940ac06113efc84c3ca | |
parent | ac1d01d43ee02d294f5fe762ae608fbb3f72babb (diff) |
extmod/uasyncio: Use .errno instead of .args[0] for OSError exceptions.
Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r-- | extmod/uasyncio/stream.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/uasyncio/stream.py b/extmod/uasyncio/stream.py index b6d787e4f..395ff1f6a 100644 --- a/extmod/uasyncio/stream.py +++ b/extmod/uasyncio/stream.py @@ -82,7 +82,7 @@ async def open_connection(host, port): try: s.connect(ai[-1]) except OSError as er: - if er.args[0] != EINPROGRESS: + if er.errno != EINPROGRESS: raise er yield core._io_queue.queue_write(s) return ss, ss |