Use new style formatting

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2019-12-28 18:39:18 +01:00
parent d746b422bf
commit dc77a8c457

View file

@ -17,11 +17,10 @@ total_active_time = 0
j = json.loads(doc)
for object in j:
line = '"%s",' % object['start']
line += '"%s"' % (object['end'] if 'end' in object else '')
line = '"{}","{}"'.format(object['start'], (object['end'] if 'end' in object else ''))
if 'tags' in object:
for tag in object['tags']:
line += ',"%s"' % tag
line += ',"{}"'.format(tag)
print(line)