Avoid crash if configuration file is not present

This commit is contained in:
Mathieu Comandon 2023-02-01 13:34:28 -08:00
parent 32cd1b72cf
commit 17decbfb28

View file

@ -136,6 +136,8 @@ class UbisoftConnectService(OnlineService):
"drive_c/Program Files (x86)/Ubisoft/Ubisoft Game Launcher/"
"cache/configuration/configurations"
)
if not os.path.exists(configurations_path):
return
with open(configurations_path, "rb") as config_file:
content = config_file.read()
return content