consolidate exception strings

This commit is contained in:
anecdata 2022-02-08 17:55:44 -06:00
parent 7411f0ca81
commit ffc217e468
2 changed files with 1 additions and 5 deletions

View File

@ -156,10 +156,6 @@ msgstr ""
msgid "%q out of bounds" msgid "%q out of bounds"
msgstr "" msgstr ""
#: shared-bindings/wifi/Monitor.c
msgid "%d out of bounds"
msgstr ""
#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
#: shared-bindings/canio/Match.c #: shared-bindings/canio/Match.c
msgid "%q out of range" msgid "%q out of range"

View File

@ -85,7 +85,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(wifi_monitor_get_channel_obj, wifi_monitor_obj_get_cha
STATIC mp_obj_t wifi_monitor_obj_set_channel(mp_obj_t self_in, mp_obj_t channel) { STATIC mp_obj_t wifi_monitor_obj_set_channel(mp_obj_t self_in, mp_obj_t channel) {
mp_int_t c = mp_obj_get_int(channel); mp_int_t c = mp_obj_get_int(channel);
if (c < 1 || c > 13) { if (c < 1 || c > 13) {
mp_raise_ValueError_varg(translate("%d out of bounds"), c); mp_raise_ValueError_varg(translate("%q out of bounds"), MP_QSTR_channel);
} }
common_hal_wifi_monitor_set_channel(self_in, c); common_hal_wifi_monitor_set_channel(self_in, c);
return mp_const_none; return mp_const_none;