Skip to content

Commit 79aec58

Browse files
committed
Skip legacy types in generated settings
1 parent 6130e93 commit 79aec58

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

tools/generate-settings-dataclasses-jinja.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050
"aa{sv}": "List[Tuple[str, Any]]",
5151
"aau": "List[List[int]]",
5252
"aay": "List[bytes]",
53-
# Legacy types:
54-
"a(ayuay)": "array of legacy IPv6 address struct",
55-
"a(ayuayu)": "array of legacy IPv6 route struct",
5653
}
5754

5855
dbus_name_type_map = {
@@ -253,7 +250,14 @@ def convert_property(node: Element,
253250
options['dbus_type'] = dbus_type
254251
options['description'] = extract_and_format_option_description(node)
255252

256-
return NmSettingPropertyIntrospection(**options, parent=parent)
253+
new_property = NmSettingPropertyIntrospection(**options, parent=parent)
254+
255+
try:
256+
new_property.python_type
257+
except KeyError:
258+
return None
259+
260+
return new_property
257261

258262

259263
def generate_introspection(root: Element) -> List[NmSettingsIntrospection]:

0 commit comments

Comments
 (0)