Fix crash on variable
This commit is contained in:
parent
b0c4a35242
commit
8f1a93f496
1 changed files with 7 additions and 7 deletions
|
@ -144,7 +144,7 @@ class Message(object):
|
||||||
|
|
||||||
self.logger.warn(f"Set variable, fetch {name}")
|
self.logger.warn(f"Set variable, fetch {name}")
|
||||||
if not None in self.variableValues.values():
|
if not None in self.variableValues.values():
|
||||||
self.logger.warn(f"now fetch {name}")
|
self.logger.warn(f"now fetch {name} for {self.id}")
|
||||||
asyncio.get_event_loop().create_task(self.getAudioFilePath())
|
asyncio.get_event_loop().create_task(self.getAudioFilePath())
|
||||||
# asyncio.get_event_loop().call_soon_threadsafe(self.getAudioFilePath)
|
# asyncio.get_event_loop().call_soon_threadsafe(self.getAudioFilePath)
|
||||||
self.logger.warn(f"started {name}")
|
self.logger.warn(f"started {name}")
|
||||||
|
@ -1336,11 +1336,11 @@ class Story(object):
|
||||||
def setVariableValue(self, name, value, store=True):
|
def setVariableValue(self, name, value, store=True):
|
||||||
if name not in self.variables:
|
if name not in self.variables:
|
||||||
self.logger.warn(f"Set variable that is not needed in the story: {name}")
|
self.logger.warn(f"Set variable that is not needed in the story: {name}")
|
||||||
else:
|
|
||||||
if self.variableValues[name] == value:
|
if name in self.variableValues and self.variableValues[name] == value:
|
||||||
self.logger.debug(f"Skip double setting of variable {name} to {value}")
|
self.logger.debug(f"Skip double setting of variable {name} to {value}")
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
self.logger.debug(f"Set variable {name} to {value}")
|
self.logger.debug(f"Set variable {name} to {value}")
|
||||||
|
|
||||||
self.variableValues[name] = value
|
self.variableValues[name] = value
|
||||||
|
|
Loading…
Reference in a new issue