mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
Be more lenient with Flatpak options
This commit is contained in:
parent
a1319a82dd
commit
6b3cacb33b
|
@ -102,20 +102,16 @@ class flatpak(Runner):
|
|||
return False
|
||||
|
||||
def uninstall(self):
|
||||
pass
|
||||
"""Flatpak can't be uninstalled from Lutris"""
|
||||
|
||||
@property
|
||||
def game_path(self):
|
||||
if shutil.which("flatpak-spawn"):
|
||||
return "/"
|
||||
try:
|
||||
install_type, application, arch, branch = (
|
||||
self.game_config[key] for key in ("install_type", "appid", "arch", "branch")
|
||||
self.game_config.get(key, "") for key in ("install_type", "appid", "arch", "branch")
|
||||
)
|
||||
except KeyError as err:
|
||||
raise RuntimeError("The game_path of a flatpak game cannot be generated due to a missing configuration "
|
||||
"element: %s" % str(err)) from err
|
||||
return os.path.join(self.install_locations[install_type], application, arch, branch)
|
||||
return os.path.join(self.install_locations[install_type or "user"], application, arch, branch)
|
||||
|
||||
def remove_game_data(self, app_id=None, game_path=None, **kwargs):
|
||||
if not self.is_installed():
|
||||
|
|
Loading…
Reference in a new issue