Skip to content

Commit bb8e9ef

Browse files
committed
tweak exception messages (re-tested)
1 parent 85301cb commit bb8e9ef

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

locale/circuitpython.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ msgid "Can't set CCCD on local Characteristic"
683683
msgstr ""
684684

685685
#: ports/espressif/common-hal/wifi/Radio.c
686-
msgid "Can't change MAC address while station is started"
686+
msgid "Can't change MAC address while station is connected"
687687
msgstr ""
688688

689689
#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c
@@ -4458,7 +4458,7 @@ msgid "wifi is not enabled"
44584458
msgstr ""
44594459

44604460
#: shared-bindings/wifi/Radio.c
4461-
msgid "wifi ssid must be between 1 and 32 characters"
4461+
msgid "wifi ssid can't be more than 32 bytes"
44624462
msgstr ""
44634463

44644464
#: shared-bindings/_bleio/Adapter.c

ports/espressif/common-hal/wifi/Radio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ mp_obj_t common_hal_wifi_radio_get_mac_address(wifi_radio_obj_t *self) {
122122

123123
void common_hal_wifi_radio_set_mac_address(wifi_radio_obj_t *self, const uint8_t *mac) {
124124
if (self->sta_mode) {
125-
mp_raise_RuntimeError(translate("Can't change MAC address while station is started"));
125+
mp_raise_RuntimeError(translate("Can't change MAC address while station is connected"));
126126
}
127127
if ((mac[0] & 0b1) == 0b1) {
128128
mp_raise_RuntimeError(translate("MAC address can't be a multicast address"));

shared-bindings/wifi/Radio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_m
327327
ssid.len = 0;
328328
mp_get_buffer_raise(args[ARG_ssid].u_obj, &ssid, MP_BUFFER_READ);
329329
if (ssid.len > 32) {
330-
mp_raise_ValueError(translate("wifi ssid must be between 1 and 32 characters"));
330+
mp_raise_ValueError(translate("wifi ssid can't be more than 32 bytes"));
331331
}
332332

333333
mp_buffer_info_t password;

0 commit comments

Comments
 (0)