Skip to content

Commit 6c9a22d

Browse files
Fix double assistant download procedure
1 parent 881465e commit 6c9a22d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/snips/SamkillaManager.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,13 @@ def sync(self, skillFilter: dict = None, download: bool = True) -> bool:
130130
self.log('Changes detected during sync but not downloading yet')
131131
else:
132132
self.log('No changes detected during sync')
133-
self.SkillManager.onSnipsAssistantDownloaded(skillsInfos=skillFilter)
134133

135-
self.stop()
134+
if not Path(self.Commons.rootDir(), f'trained/assistants/assistant_{self.LanguageManager.activeLanguage}').exists():
135+
self.SnipsConsoleManager.doDownload()
136+
else:
137+
self.SkillManager.onSnipsAssistantDownloaded(skillsInfos=skillFilter)
136138

137-
if not Path(self.Commons.rootDir(), f'trained/assistants/assistant_{self.LanguageManager.activeLanguage}').exists():
138-
self.SnipsConsoleManager.doDownload()
139+
self.stop()
139140

140141
except AssistantNotFoundError:
141142
self.log(f'Assistant project id \'{activeProjectId}\' for lang \'{activeLang}\' doesn\'t exist. Check your config.py')

0 commit comments

Comments
 (0)