Strip whitespaces in shift imports
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a18040fb57
commit
e8cd15bf67
|
@ -35,7 +35,7 @@ def import_calendar(calendar):
|
||||||
if not summary:
|
if not summary:
|
||||||
continue
|
continue
|
||||||
if location is not None:
|
if location is not None:
|
||||||
location = location.decode()
|
location = location.decode().strip()
|
||||||
|
|
||||||
if location:
|
if location:
|
||||||
room = location
|
room = location
|
||||||
|
@ -43,6 +43,7 @@ def import_calendar(calendar):
|
||||||
try:
|
try:
|
||||||
# new edge case: location is defined, but summary contains an addition to the location and a count
|
# 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, required_helpers = tuple(summary.rsplit(maxsplit=1))
|
||||||
|
room2 = room2.strip()
|
||||||
required_helpers = int(required_helpers)
|
required_helpers = int(required_helpers)
|
||||||
room = f"{room} ({room2})"
|
room = f"{room} ({room2})"
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|
Loading…
Reference in New Issue