def load_time_spent(task):
dest = FilePath(appdirs.user_data_dir("myriagon", "hawkowl")).child("time")
dest.makedirs(True)
task_time_file = dest.child(str(task.id) + ".json")
if not task_time_file.exists():
dest.makedirs(True)
task_time_file.setContent(b"[]")
return cattr.loads(
json.loads(task_time_file.getContent().decode('utf8')),
List[TimeSpent])
评论列表
文章目录