summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Geier <geier@lostpackets.de>2023-05-24 10:13:25 +0200
committerGitHub <noreply@github.com>2023-05-24 10:13:25 +0200
commit3252819ee8294df662054a3bbb8b33f2c1a1af19 (patch)
treebc74c6644c82a3213d0df56455b5dea3d60140d8
parenta6657fd828c582615ca34a9c5a5fb8bfa2979c97 (diff)
only append ics if successful
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
-rw-r--r--khal/icalendar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/khal/icalendar.py b/khal/icalendar.py
index 6bacc5ec..29fa60cb 100644
--- a/khal/icalendar.py
+++ b/khal/icalendar.py
@@ -80,7 +80,8 @@ def split_ics(ics: str, random_uid: bool=False, default_timezone=None):
except Exception as exception:
logger.warn(f'Error when trying to import the event {uid}')
saved_exception = exception
- out.append(ics)
+ else:
+ out.append(ics)
if saved_exception:
raise saved_exception
return out