comparison libervia/server/tasks.py @ 1166:5baf7ece44a0

server (tasks): fixed crash when --dev_mode is used
author Goffi <goffi@goffi.org>
date Wed, 10 Apr 2019 21:06:35 +0200
parents 813d54af8c0c
children 170802865156
comparison
equal deleted inserted replaced
1165:6424d3684d1e 1166:5baf7ece44a0
128 pass 128 pass
129 else: 129 else:
130 prepare(self) 130 prepare(self)
131 self.validateData(task_data) 131 self.validateData(task_data)
132 if self.host.options['dev_mode']: 132 if self.host.options['dev_mode']:
133 dirs = task_data.get['WATCH_DIRS'] 133 dirs = task_data.get('WATCH_DIRS', [])
134 for dir_ in dirs: 134 for dir_ in dirs:
135 self.host.files_watcher.watchDir( 135 self.host.files_watcher.watchDir(
136 dir_, auto_add=True, recursive=True, 136 dir_, auto_add=True, recursive=True,
137 callback=self._autorunTask, task_name=task_name) 137 callback=self._autorunTask, task_name=task_name)
138 138