Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More robust 'Name' field parsing in SeriesMgr Excel input #103

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion SeriesMgr/GetModelInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ def ExtractRaceResultsExcel( raceInSeries, seriesModel ):
try:
info['lastName'], info['firstName'] = name.split(',',1)
except:
pass
# Failing that, split on the last space character.
try:
info['firstName'], info['lastName'] = name.rsplit(' ',1)
except:
# If there are no spaces to split on, treat the entire name as lastName. This is fine.
info['lastName'] = name

if not info['firstName'] and not info['lastName']:
continue
Expand Down