aboutsummaryrefslogtreecommitdiff
path: root/lessons.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-04-05 16:38:26 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-04-05 16:38:26 +0200
commit6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6 (patch)
tree2370089ad975240d91783133fe63911170c2af7f /lessons.py
parentf61b34dbdb4b987359b6fb6543b942c799ac350e (diff)
downloadavail-lessons-6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6.tar.gz
avail-lessons-6c9cbaf8aa1915dcb3158d8ae856dab0d15b19e6.zip
strip leading whitespace from formatted events
Diffstat (limited to 'lessons.py')
-rwxr-xr-xlessons.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lessons.py b/lessons.py
index cf0dec9..b29918d 100755
--- a/lessons.py
+++ b/lessons.py
@@ -90,8 +90,8 @@ def format_period(period: webuntis.objects.PeriodObject,
if period_evs:
for event in period_evs:
period_events += f' {event.summary} |'
- # strip the trailing ' |' suffix
- period_events = period_events[:-2]
+ # strip the leading ' ' and trailing ' |'
+ period_events = period_events[1:-2]
output = config.get(
'fmt') or '{week} {date.strftime(\'%d.%m\')} {period_events}'