Skip to content

Commit 8c88e30

Browse files
AntiDogcfkh
authored andcommitted
STCC-128 Deleted Uservariables are now created by the converter (#62)
1 parent 5d4db5c commit 8c88e30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/scratchtocatrobat/converter/converter.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1858,7 +1858,8 @@ def _convert_variable_block(self):
18581858
if user_variable is None:
18591859
# WORKAROUND: for generated variables added in preprocessing step
18601860
# must be generated user variable, otherwise the variable must have already been added at this stage!
1861-
assert(_is_generated(variable_name))
1861+
if not _is_generated(variable_name):
1862+
log.warning("UserVariable with name :'" + variable_name + "' does not exist. Creating it now.")
18621863
catrobat.add_user_variable(self.project, variable_name, self.sprite, self.sprite.getName())
18631864
user_variable = self.scene.getDataContainer().getUserVariable(self.sprite, variable_name)
18641865

0 commit comments

Comments
 (0)