From 16fa06f26da4d4b768a76f91a517625d12251c96 Mon Sep 17 00:00:00 2001 From: boyska Date: Sat, 10 Jun 2017 00:40:57 +0200 Subject: [PATCH] ICS: pure talk senza location --- plugins/talks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/talks.py b/plugins/talks.py index 3e37d3e..28ca03b 100644 --- a/plugins/talks.py +++ b/plugins/talks.py @@ -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