Fix improper game version check
This commit is contained in:
parent
7c45133508
commit
c7918f8a20
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ README = (HERE / "README.md").read_text()
|
||||
|
||||
setup(
|
||||
name='worthless',
|
||||
version='1.2.9-3',
|
||||
version='1.2.9-4',
|
||||
packages=['worthless', 'worthless.classes', 'worthless.classes.launcher', 'worthless.classes.installer'],
|
||||
url='https://git.froggi.es/tretrauit/worthless-launcher',
|
||||
license='MIT License',
|
||||
|
@ -331,9 +331,12 @@ class Installer:
|
||||
|
||||
async def download_game_update(self, from_version: str = None):
|
||||
if not from_version:
|
||||
self._version = from_version
|
||||
if self._version:
|
||||
from_version = self._version
|
||||
else:
|
||||
from_version = self._version = self.get_game_version()
|
||||
if not from_version:
|
||||
raise ValueError("Game version not found")
|
||||
raise ValueError("No game version found")
|
||||
version_info = await self._launcher.get_resource_info()
|
||||
if version_info is None:
|
||||
raise RuntimeError("Failed to fetch game resource info.")
|
||||
@ -346,9 +349,12 @@ class Installer:
|
||||
|
||||
async def download_voiceover_update(self, language: str, from_version: str = None):
|
||||
if not from_version:
|
||||
self._version = from_version
|
||||
if self._version:
|
||||
from_version = self._version
|
||||
else:
|
||||
from_version = self._version = self.get_game_version()
|
||||
if not from_version:
|
||||
raise ValueError("Game version not found, use install_game to install the game.")
|
||||
raise ValueError("No game version found")
|
||||
version_info = await self._launcher.get_resource_info()
|
||||
if version_info is None:
|
||||
raise RuntimeError("Failed to fetch game resource info.")
|
||||
|
Loading…
Reference in New Issue
Block a user