revert error to avoid translation changes

This commit is contained in:
Roy Hooper 2020-08-08 18:40:45 -04:00
parent e73dba21d2
commit 00a3a25b94
2 changed files with 3 additions and 8 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-04 18:42-0500\n"
"POT-Creation-Date: 2020-08-08 18:40-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1942,6 +1942,7 @@ msgid "can't assign to expression"
msgstr ""
#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c
#: shared-module/_pixelbuf/PixelBuf.c
msgid "can't convert %q to %q"
msgstr ""
@ -3139,10 +3140,6 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c
msgid "tuple/list required on RHS"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c
msgid "tx and rx cannot both be None"

View File

@ -333,9 +333,7 @@ STATIC mp_obj_t pixelbuf_pixelbuf_subscr(mp_obj_t self_in, mp_obj_t index_in, mp
size_t num_items = mp_obj_get_int(mp_obj_len(value));
if (num_items != slice_len && num_items != (slice_len * common_hal__pixelbuf_pixelbuf_get_bpp(self_in))) {
mp_raise_ValueError_varg(translate("Unmatched number of items on RHS (expected %d or %d, got %d)."),
slice_len, slice_len * common_hal__pixelbuf_pixelbuf_get_bpp(self_in),
num_items);
mp_raise_ValueError_varg(translate("Unmatched number of items on RHS (expected %d, got %d)."), slice_len, num_items);
}
common_hal__pixelbuf_pixelbuf_set_pixels(self_in, slice.start, slice.step, slice_len, value, num_items != slice_len);