Get rid of an unneeded message

This commit is contained in:
Jeff Epler 2022-09-22 08:35:51 -05:00
parent 8227903b61
commit 4f75d09e86
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE
1 changed files with 1 additions and 4 deletions

View File

@ -85,10 +85,7 @@ STATIC mp_obj_t i2ctarget_i2c_target_make_new(const mp_obj_type_t *type, size_t
uint8_t *addresses = NULL;
unsigned int i = 0;
while ((item = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
mp_int_t value = mp_arg_validate_type_int(item, MP_QSTR_address);
if (value < 0x00 || value > 0x7f) {
mp_raise_ValueError(translate("address out of bounds"));
}
mp_uint_t value = mp_arg_validate_int_range(mp_obj_get_int(item), 0x00, 0x7f, MP_QSTR_address);
addresses = m_renew(uint8_t, addresses, i, i + 1);
addresses[i++] = value;
}