Skip to content

Commit

Permalink
Fixed crash parsing deaths in custom info
Browse files Browse the repository at this point in the history
  • Loading branch information
Kataiser committed Jul 14, 2023
1 parent 7bcc9b7 commit 949be6e
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('<')[0] if 'Deaths: ' in session_data else None
deaths_str = session_data.partition('Deaths: ')[2].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 949be6e

Please sign in to comment.