Fix updating padatious intents after intent reload

Training is called from wait_and_train with None as message, this commit adds propper handling for this case.
pull/1696/head
Åke Forslund 2018-07-19 14:06:58 +02:00
parent 0e61700e13
commit b60320bcae
1 changed files with 4 additions and 1 deletions

View File

@ -58,7 +58,10 @@ class PadatiousService(FallbackSkill):
self.train_time = get_time() + self.train_delay
def train(self, message=None):
single_thread = message.data.get('single_thread', False)
if message is None:
single_thread = False
else:
single_thread = message.data.get('single_thread', False)
self.finished_training_event.clear()
LOG.info('Training...')