summaryrefslogtreecommitdiff
path: root/docs/library
diff options
context:
space:
mode:
Diffstat (limited to 'docs/library')
-rw-r--r--docs/library/builtins.rst4
-rw-r--r--docs/library/uerrno.rst4
2 files changed, 2 insertions, 6 deletions
diff --git a/docs/library/builtins.rst b/docs/library/builtins.rst
index 365248dc7..3029cd9e3 100644
--- a/docs/library/builtins.rst
+++ b/docs/library/builtins.rst
@@ -176,10 +176,6 @@ Exceptions
.. exception:: OSError
- |see_cpython| `python:OSError`. MicroPython doesn't implement ``errno``
- attribute, instead use the standard way to access exception arguments:
- ``exc.args[0]``.
-
.. exception:: RuntimeError
.. exception:: StopIteration
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