diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-08-08 18:24:49 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2018-08-09 13:29:30 -0700 |
| commit | 96ebf5bc3fb455162286b9bc31e763f3c4f1c457 (patch) | |
| tree | 3d06bc866bcf943a0e0ea881a1fcab9826291a1c /py/stream.c | |
| parent | 9da79c880e387ab05a683b67feb8f3da600d937d (diff) | |
Two fixes and translate more strings.
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
Diffstat (limited to 'py/stream.c')
| -rw-r--r-- | py/stream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/stream.c b/py/stream.c index 448de41bb..8cf375b16 100644 --- a/py/stream.c +++ b/py/stream.c @@ -31,6 +31,7 @@ #include "py/objstr.h" #include "py/stream.h" #include "py/runtime.h" +#include "supervisor/shared/translate.h" // This file defines generic Python stream read/write methods which // dispatch to the underlying stream interface of an object. @@ -92,7 +93,7 @@ const mp_stream_p_t *mp_get_stream_raise(mp_obj_t self_in, int flags) { || ((flags & MP_STREAM_OP_WRITE) && stream_p->write == NULL) || ((flags & MP_STREAM_OP_IOCTL) && stream_p->ioctl == NULL)) { // CPython: io.UnsupportedOperation, OSError subclass - mp_raise_msg(&mp_type_OSError, "stream operation not supported"); + mp_raise_msg(&mp_type_OSError, translate("stream operation not supported")); } return stream_p; } |
