2
0
Fork 0

Strip whitespaces in shift imports
continuous-integration/drone/push Build is passing Details

This commit is contained in:
xandy 2024-05-11 15:30:33 +00:00
parent a18040fb57
commit e8cd15bf67
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,7 @@ def import_calendar(calendar):
if not summary:
continue
if location is not None:
location = location.decode()
location = location.decode().strip()
if location:
room = location
@ -43,6 +43,7 @@ def import_calendar(calendar):
try:
# new edge case: location is defined, but summary contains an addition to the location and a count
room2, required_helpers = tuple(summary.rsplit(maxsplit=1))
room2 = room2.strip()
required_helpers = int(required_helpers)
room = f"{room} ({room2})"
except ValueError: