aboutsummaryrefslogtreecommitdiff
path: root/docs/library/uerrno.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library/uerrno.rst')
-rw-r--r--docs/library/uerrno.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/library/uerrno.rst b/docs/library/uerrno.rst
index def01362f..1d60c80e1 100644
--- a/docs/library/uerrno.rst
+++ b/docs/library/uerrno.rst
@@ -16,13 +16,13 @@ Constants
Error codes, based on ANSI C/POSIX standard. All error codes start with
"E". As mentioned above, inventory of the codes depends on
- :term:`MicroPython port`. Errors are usually accessible as ``exc.args[0]``
+ :term:`MicroPython port`. Errors are usually accessible as ``exc.errno``
where ``exc`` is an instance of `OSError`. Usage example::
try:
uos.mkdir("my_dir")
except OSError as exc:
- if exc.args[0] == uerrno.EEXIST:
+ if exc.errno == uerrno.EEXIST:
print("Directory already exists")
.. data:: errorcode