mirror of
https://github.com/derrod/legendary.git
synced 2025-01-03 04:45:28 +00:00
[core] Show error if old manifest can't be loaded
Also prevents crashes.
This commit is contained in:
parent
1787e3ac74
commit
532e1df237
|
@ -460,8 +460,8 @@ class LegendaryCore:
|
|||
|
||||
def get_installed_manifest(self, app_name):
|
||||
igame = self.get_installed_game(app_name)
|
||||
if old_bytes := self.lgd.load_manifest(app_name, igame.version):
|
||||
return old_bytes, igame.base_urls
|
||||
old_bytes = self.lgd.load_manifest(app_name, igame.version)
|
||||
return old_bytes, igame.base_urls
|
||||
|
||||
def get_cdn_manifest(self, game, platform_override=''):
|
||||
base_urls = []
|
||||
|
@ -527,7 +527,10 @@ class LegendaryCore:
|
|||
old_manifest = self.load_manfiest(old_bytes)
|
||||
elif not disable_patching and not force and self.is_installed(game.app_name):
|
||||
old_bytes, _ = self.get_installed_manifest(game.app_name)
|
||||
old_manifest = self.load_manfiest(old_bytes)
|
||||
if not old_bytes:
|
||||
self.log.error(f'Could not load old manifest, patching will not work!')
|
||||
else:
|
||||
old_manifest = self.load_manfiest(old_bytes)
|
||||
|
||||
base_urls = list(game.base_urls) # copy list for manipulation
|
||||
|
||||
|
|
Loading…
Reference in a new issue