fix loading tasks

This commit is contained in:
j 2016-02-11 21:24:32 +05:30
parent 146e64e2ae
commit 647afcf2ab
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ class Tasks(Thread):
with open(self._taskspath) as f: with open(self._taskspath) as f:
tasks = json.load(f) tasks = json.load(f)
for task in tasks: for task in tasks:
self.q.put(task) if len(task) == 2:
self.q.put(tuple(task))
logger.debug('loaded %s tasks', len(tasks)) logger.debug('loaded %s tasks', len(tasks))
except: except:
logger.debug('failed to load saved tasks', exc_info=True) logger.debug('failed to load saved tasks', exc_info=True)