Skip to content

Commit

Permalink
Fixed crash parsing deaths in custom info (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kataiser committed Jul 15, 2023
1 parent 949be6e commit 81857ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimizer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def request_force_timeout(url: str):
tas_has_finished = "Running: False" in session_data

if not tas_has_finished and not init:
deaths_str = session_data.partition('Deaths: ')[2].partition('\n')[0] if 'Deaths: ' in session_data else None
deaths_str = session_data.partition('Deaths: ')[2].partition('<')[0].partition('\n')[0] if 'Deaths: ' in session_data else None
deaths = int(deaths_str) if deaths_str else 0
tas_has_finished = deaths > self.target_deaths

Expand Down

0 comments on commit 81857ff

Please sign in to comment.