Damien George
69661f3343
all: Reformat C and Python source code with tools/codeformat.py.
...
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-02-28 10:33:03 +11:00
Josh Lloyd
7d58a197cf
py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions.
...
Fixes #5140 .
2019-09-26 16:04:56 +10:00
Damien George
b1b090255c
py/moduerrno: Make list of errno codes configurable.
...
It's configurable by defining MICROPY_PY_UERRNO_LIST. If this is not
defined then a default is provided.
2017-02-22 12:58:11 +11:00
Damien George
f563406d2e
py/moduerrno: Make uerrno.errorcode dict configurable.
...
It's configured by MICROPY_PY_UERRNO_ERRORCODE and enabled by default
(since that's the behaviour before this patch).
Without this dict the lookup of errno codes to strings must use the
uerrno module itself.
2017-02-22 12:58:11 +11:00
Damien George
93c4a6a3f7
all: Remove 'name' member from mp_obj_module_t struct.
...
One can instead lookup __name__ in the modules dict to get the value.
2016-09-22 00:23:16 +10:00
Paul Sokolovsky
2ec0ee082a
py/moduerrno: Add ECONNREFUSED, one of frequent networking errors.
2016-05-28 00:17:19 +03:00
Paul Sokolovsky
c76acd8c23
py/moduerrno: Add EEXIST, EISDIR.
...
Useful to check file/dir operations result, in particular used by upip.
2016-05-25 01:23:57 +03:00
Paul Sokolovsky
10503f3534
py/moduerrno: Add EACCES, pretty common error on Unix.
2016-05-13 00:15:38 +03:00
Damien George
9a92499641
py/objexcept: Don't convert errno to str in constructor, do it in print.
...
OSError's are now printed like:
OSError: [Errno 1] EPERM
but only if the string corresponding to the errno is found.
2016-05-12 14:27:52 +01:00
Damien George
d45e5f8c35
py: Add mp_errno_to_str() and use it to provide nicer OSError msgs.
...
If an OSError is raised with an integer argument, and that integer
corresponds to an errno, then the string for the errno is used as the
argument to the exception, instead of the integer. Only works if
the uerrno module is enabled.
2016-05-12 13:20:40 +01:00
Damien George
47bf6ba61a
py/moduerrno: Add more constants to the errno module.
2016-05-12 13:18:48 +01:00
Damien George
596a3feb8f
py: Add uerrno module, with errno constants and dict.
2016-05-10 23:30:39 +01:00