Skip to content

Commit

Permalink
Only manipulate string if not empty in utils.py
Browse files Browse the repository at this point in the history
closes #526
  • Loading branch information
erdieee committed Feb 25, 2024
1 parent d1868e9 commit c4af845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastf1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def to_datetime(x: Union[str, datetime.datetime]) \
Args:
x: timestamp
"""
if isinstance(x, str):
if isinstance(x, str) and x.strip() != '':
try:
date, time = x.strip('Z').split('T')
year, month, day = date.split('-')
Expand Down

0 comments on commit c4af845

Please sign in to comment.