mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-03 15:49:07 -04:00
Fix crash
This commit is contained in:
parent
dd3c75d2c7
commit
ff5fff7f4b
1 changed files with 4 additions and 1 deletions
|
@ -46,7 +46,10 @@ class Children:
|
|||
|
||||
def __getitem__(self, key):
|
||||
if isinstance(key, int):
|
||||
return self._children[key]
|
||||
if key >= len(self._children):
|
||||
return None
|
||||
else:
|
||||
return self._children[key]
|
||||
else:
|
||||
return [child for child in self._children if isinstance(child, key)]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue