From a74f7266d463024a2b983f6ad815323ee6ecfe26 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Wed, 14 Nov 2018 10:54:36 +0100 Subject: [PATCH] Added fallback for non-existance of colon Signed-off-by: Jim Martens --- src/twomartens/calendarsync/calendarsync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/twomartens/calendarsync/calendarsync.py b/src/twomartens/calendarsync/calendarsync.py index c5fce4b..478794b 100644 --- a/src/twomartens/calendarsync/calendarsync.py +++ b/src/twomartens/calendarsync/calendarsync.py @@ -76,6 +76,8 @@ def sync(calendar_url: str, event_collection_path: str) -> None: event_content = event_content.replace('', location_info[0]) if len(location_info) == 2: event_content = event_content.replace('
', location_info[1]) + else + event_content = event.content.replace('
', location_info[0]) event_filename = begin.date().isoformat() + '-' + event.name.replace(' ', '_') + '.markdown' with open(event_collection_path + event_filename, 'w', encoding='utf-8', newline='\n') as event_file: