diff options
| author | Daniel Campora <daniel@wipy.io> | 2015-06-29 22:45:39 +0200 |
|---|---|---|
| committer | Daniel Campora <daniel@wipy.io> | 2015-07-02 11:53:08 +0200 |
| commit | 077812b2abe3f5e5325194f9694dad7eb38186dd (patch) | |
| tree | 61db6e4f1d4c4ab954e92b77272fb32936598758 /py/mpconfig.h | |
| parent | bdf958df30539f399edef8650947d7ff4048a8ca (diff) | |
py: Add TimeoutError exception subclassed from OSError.
The TimeoutError is useful for some modules, specially the the
socket module. TimeoutError can then be alised to socket.timeout
and then Python code can differentiate between socket.error and
socket.timeout.
Diffstat (limited to 'py/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index 9f541ef70..e92e4c45d 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -462,6 +462,11 @@ typedef double mp_float_t; #define MICROPY_PY_BUILTINS_RANGE_ATTRS (1) #endif +// Whether to support timeout exceptions (like socket.timeout) +#ifndef MICROPY_PY_BUILTINS_TIMEOUTERROR +#define MICROPY_PY_BUILTINS_TIMEOUTERROR (0) +#endif + // Whether to support complete set of special methods // for user classes, otherwise only the most used #ifndef MICROPY_PY_ALL_SPECIAL_METHODS |
