mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
py/objstr: Remove duplicate % in error string.
The double-% was added in11de8399fe(Jun 2014) when such errors were formatted with printf. But then55830dd9bf(Dec 2018) changed mp_obj_new_exception_msg() to not format the message, as discussed in #3004. So such error strings are no longer formatted and a % is just that.
This commit is contained in:
committed by
Damien George
parent
ed848553b4
commit
fccf17521a
@@ -1523,7 +1523,7 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, size_t n_args, const mp_obj_
|
||||
size_t slen;
|
||||
const char *s = mp_obj_str_get_data(arg, &slen);
|
||||
if (slen != 1) {
|
||||
mp_raise_TypeError("%%c needs int or char");
|
||||
mp_raise_TypeError("%c needs int or char");
|
||||
}
|
||||
mp_print_strn(&print, s, 1, flags, ' ', width);
|
||||
} else if (arg_looks_integer(arg)) {
|
||||
|
||||
Reference in New Issue
Block a user