Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Fix Critical League Launching Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyrluckechuck committed Nov 13, 2023
1 parent 33893e8 commit d28153c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion tft.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import pyautogui as auto
import requests
from requests import HTTPError
from win32process import DETACHED_PROCESS

from tft_bot import config
from tft_bot.constants import CONSTANTS
Expand Down Expand Up @@ -131,7 +132,14 @@ def restart_league_client() -> None:
executable_with_launch_args = [CONSTANTS["executables"]["riot_client"]["client_services"]] + CONSTANTS[
"executables"
]["riot_client"]["league_launch_arguments"]
subprocess.run(args=executable_with_launch_args, check=True)
subprocess.Popen( # pylint: disable=consider-using-with
args=executable_with_launch_args,
stdin=None,
stdout=None,
stderr=None,
close_fds=True,
creationflags=DETACHED_PROCESS,
)
time.sleep(3)
if not LCU_INTEGRATION.connect_to_lcu(wait_for_availability=True):
restart_league_client()
Expand Down
2 changes: 1 addition & 1 deletion tft_bot/resources/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ override_install_location_riot_client: ''
# Version of the YAML.
version: 7
# Version of the TFT set.
set: 9.5
set: 9

0 comments on commit d28153c

Please sign in to comment.