1
0
Fork 0

ICS: pure talk senza location

This commit is contained in:
boyska 2017-06-10 00:40:57 +02:00
parent bb45bac62a
commit 16fa06f26d

View file

@ -315,7 +315,7 @@ def talks_to_ics():
def talk_to_ics(talk):
if 'time' not in talk or 'duration' not in talk or 'room' not in talk:
if 'time' not in talk or 'duration' not in talk:
return ''
start = talk['time']
end = start + datetime.timedelta(minutes=talk['duration'])
@ -331,7 +331,8 @@ def talk_to_ics(talk):
content += "DTEND:%s\n" % time.strftime('%Y%m%dT%H%M%SZ',
time.gmtime(float(
end.strftime('%s'))))
content += "LOCATION:%s\n" % talk['room']
content += "LOCATION:%s\n" % (talk['room'] if 'room' in talk else 'todo')
content += 'END:VEVENT\n'
return content