def _update(self):
update = False<EOL>with self._lock:<EOL><INDENT>for fname in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>data_file = join(self._data_location, fname)<EOL>if exists(data_file):<EOL><INDENT>mtime = getmtime(data_file)<EOL>if mtime > self._mtime:<EOL><INDENT>self._mtime = mtime<EOL>update = True<EOL><DEDENT><DEDENT><DEDENT>if update:<EOL><INDENT>self._tasks = {}<EOL>tasklist = loads(run(['<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'.format(**locals()), '<STR_LIT>'], stdout=PIPE).stdout.decode('<STR_LIT:utf-8>'))<EOL>for task in tasklist:<EOL><INDENT>project = task['<STR_LIT>'] if '<STR_LIT>' in task else '<STR_LIT>'<EOL>if project not in self._tasks:<EOL><INDENT>self._tasks[project] = {}<EOL><DEDENT>self._tasks[project][task['<STR_LIT>']] = task<EOL><DEDENT><DEDENT><DEDENT>
Reload Taskwarrior files if the mtime is newer