Return empty list if there are no variables
This commit is contained in:
parent
326efbe94d
commit
1127cc0a19
1 changed files with 4 additions and 1 deletions
|
@ -29,7 +29,10 @@ class ScratchObj(BaseObj):
|
|||
|
||||
@property
|
||||
def variables(self):
|
||||
return [ScratchDataStructureObj(x) for x in self._d['variables']]
|
||||
try:
|
||||
return [ScratchDataStructureObj(x) for x in self._d['variables']]
|
||||
except KeyError:
|
||||
return []
|
||||
|
||||
|
||||
class ScratchMediaObj(BaseObj):
|
||||
|
|
Reference in a new issue