Skip to content

Commit 7e56f6e

Browse files
authored
Merge pull request #2721 from jepler/cannot-assign
runtime: Improve error message when setting read-only property
2 parents 98f5cf2 + 9d2270a commit 7e56f6e

File tree

14 files changed

+66
-14
lines changed

14 files changed

+66
-14
lines changed

locale/ID.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -134,6 +134,10 @@ msgstr ""
134134
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
135135
msgstr "'%s' integer 0x%x tidak cukup didalam mask 0x%x"
136136

137+
#: py/runtime.c
138+
msgid "'%s' object cannot assign attribute '%q'"
139+
msgstr ""
140+
137141
#: py/proto.c
138142
msgid "'%s' object does not support '%q'"
139143
msgstr ""

locale/circuitpython.pot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -133,6 +133,10 @@ msgstr ""
133133
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
134134
msgstr ""
135135

136+
#: py/runtime.c
137+
msgid "'%s' object cannot assign attribute '%q'"
138+
msgstr ""
139+
136140
#: py/proto.c
137141
msgid "'%s' object does not support '%q'"
138142
msgstr ""

locale/de_DE.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: Pascal Deneaux\n"
1313
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@@ -135,6 +135,10 @@ msgstr "'%s' integer %d ist nicht im Bereich %d..%d"
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr "'%s' Integer 0x%x passt nicht in Maske 0x%x"
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/en_US.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -133,6 +133,10 @@ msgstr ""
133133
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
134134
msgstr ""
135135

136+
#: py/runtime.c
137+
msgid "'%s' object cannot assign attribute '%q'"
138+
msgstr ""
139+
136140
#: py/proto.c
137141
msgid "'%s' object does not support '%q'"
138142
msgstr ""

locale/en_x_pirate.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: \n"
1313
"Language-Team: @sommersoft, @MrCertainly\n"
@@ -135,6 +135,10 @@ msgstr ""
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr ""
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/es.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
1212
"Last-Translator: \n"
1313
"Language-Team: \n"
@@ -135,6 +135,10 @@ msgstr "'%s' entero %d no esta dentro del rango %d..%d"
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr "'%s' entero 0x%x no cabe en la máscara 0x%x"
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/fil.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
1212
"Last-Translator: Timothy <[email protected]>\n"
1313
"Language-Team: fil\n"
@@ -136,6 +136,10 @@ msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
136136
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
137137
msgstr "'%s' integer 0x%x ay wala sa mask na sakop ng 0x%x"
138138

139+
#: py/runtime.c
140+
msgid "'%s' object cannot assign attribute '%q'"
141+
msgstr ""
142+
139143
#: py/proto.c
140144
msgid "'%s' object does not support '%q'"
141145
msgstr ""

locale/fr.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: 0.1\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
1313
"Last-Translator: Pierrick Couturier <[email protected]>\n"
1414
"Language-Team: fr\n"
@@ -137,6 +137,10 @@ msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d"
137137
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
138138
msgstr "'%s' l'entier 0x%x ne correspond pas au masque 0x%x"
139139

140+
#: py/runtime.c
141+
msgid "'%s' object cannot assign attribute '%q'"
142+
msgstr ""
143+
140144
#: py/proto.c
141145
msgid "'%s' object does not support '%q'"
142146
msgstr ""

locale/it_IT.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
1313
"Last-Translator: Enrico Paganin <[email protected]>\n"
1414
"Language-Team: \n"
@@ -135,6 +135,10 @@ msgstr "intero '%s' non è nell'intervallo %d..%d"
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr "intero '%s' non è nell'intervallo %d..%d"
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/ko.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: 2019-05-06 14:22-0700\n"
1313
"Last-Translator: \n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -135,6 +135,10 @@ msgstr ""
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr ""
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/pl.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
1212
"Last-Translator: Radomir Dopieralski <[email protected]>\n"
1313
"Language-Team: pl\n"
@@ -134,6 +134,10 @@ msgstr "'%s' liczba %d poza zakresem %d..%d"
134134
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
135135
msgstr "'%s' liczba 0x%x nie pasuje do maski 0x%x"
136136

137+
#: py/runtime.c
138+
msgid "'%s' object cannot assign attribute '%q'"
139+
msgstr ""
140+
137141
#: py/proto.c
138142
msgid "'%s' object does not support '%q'"
139143
msgstr ""

locale/pt_BR.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
11+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1212
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
1313
"Last-Translator: \n"
1414
"Language-Team: \n"
@@ -135,6 +135,10 @@ msgstr ""
135135
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
136136
msgstr ""
137137

138+
#: py/runtime.c
139+
msgid "'%s' object cannot assign attribute '%q'"
140+
msgstr ""
141+
138142
#: py/proto.c
139143
msgid "'%s' object does not support '%q'"
140144
msgstr ""

locale/zh_Latn_pinyin.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: circuitpython-cn\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2020-03-17 16:39-0500\n"
10+
"POT-Creation-Date: 2020-03-20 17:57-0500\n"
1111
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
1212
"Last-Translator: hexthat\n"
1313
"Language-Team: Chinese Hanyu Pinyin\n"
@@ -140,6 +140,10 @@ msgstr "'%s' zhěngshù %d bùzài fànwéi nèi %d.%d"
140140
msgid "'%s' integer 0x%x does not fit in mask 0x%x"
141141
msgstr "'%s' zhěngshù 0x%x bù shìyòng yú yǎn mǎ 0x%x"
142142

143+
#: py/runtime.c
144+
msgid "'%s' object cannot assign attribute '%q'"
145+
msgstr ""
146+
143147
#: py/proto.c
144148
msgid "'%s' object does not support '%q'"
145149
msgstr "'%s' duì xiàng bù zhīchí '%q'"

py/runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) {
11721172
mp_raise_AttributeError(translate("no such attribute"));
11731173
} else {
11741174
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError,
1175-
translate("'%s' object has no attribute '%q'"),
1175+
translate("'%s' object cannot assign attribute '%q'"),
11761176
mp_obj_get_type_str(base), attr));
11771177
}
11781178
}

0 commit comments

Comments
 (0)