Skip to content

Commit

Permalink
Fixed Session error
Browse files Browse the repository at this point in the history
  • Loading branch information
Kataiser committed Mar 2, 2024
1 parent c530e96 commit ced96ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions optimizer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,11 +543,11 @@ def ensure_death_count_info(address: str):
short_timeout = float(settings()['session_short_timeout'])
template_page: str = requests.get(f'{address}tas/custominfo', timeout=short_timeout).text

if 'Deaths: {Session.Deaths}' not in template_page:
if 'Deaths: {Level.Session.Deaths}' not in template_page:
template = template_page.partition('<pre>')[2].partition('</pre>')[0]
template_fixed = (template + '\r\nDeaths: {Session.Deaths}').replace('\r\n', '\\n')
template_fixed = (template + '\r\nDeaths: {Level.Session.Deaths}').replace('\r\n', '\\n')
requests.post(f'{address}tas/custominfo?template={template_fixed}')
print("Added \"Deaths: {Session.Deaths}\" to your custom info template")
print("Added \"Deaths: {Level.Session.Deaths}\" to your custom info template")


# decorator to kill a synchronous function after some time
Expand Down

0 comments on commit ced96ee

Please sign in to comment.