Skip to content

Commit 1309235

Browse files
committed
Updates for CircuitPython 9.x
1 parent f9d3ec5 commit 1309235

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ports/raspberrypi/common-hal/mdns/Server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ STATIC void srv_txt_cb(struct mdns_service *service, void *ptr) {
302302
for (size_t i = 0; i < self->num_txt_records; i++) {
303303
res = mdns_resp_add_service_txtitem(service, self->txt_records[i], strlen(self->txt_records[i]));
304304
if (res != ERR_OK) {
305-
mp_raise_RuntimeError(translate("Failed to add service TXT record"));
305+
mp_raise_RuntimeError(MP_ERROR_TEXT("Failed to add service TXT record"));
306306
return;
307307
}
308308
}

shared-bindings/mdns/Server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ STATIC mp_obj_t mdns_server_advertise_service(mp_uint_t n_args, const mp_obj_t *
212212
for (size_t i = 0; i < num_txt_records; i++) {
213213
mp_obj_t txt_record = mp_obj_subscr(txt_records, MP_OBJ_NEW_SMALL_INT(i), MP_OBJ_SENTINEL);
214214
if (!mp_obj_is_str_or_bytes(txt_record)) {
215-
mp_raise_ValueError(translate("Failed to add service TXT record; non-string or bytes found in txt_records"));
215+
mp_raise_ValueError(MP_ERROR_TEXT("Failed to add service TXT record; non-string or bytes found in txt_records"));
216216
}
217217
txt_records_array[i] = mp_obj_str_get_str(txt_record);
218218
}

0 commit comments

Comments
 (0)