Cleanups
This commit is contained in:
@@ -80,9 +80,7 @@ class game(Gtk.Box): # pylint: disable=invalid-name
|
||||
subprocess.Popen(
|
||||
["flatpak-spawn", "--host", *self.executable] # Flatpak
|
||||
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
|
||||
else self.executable # Windows
|
||||
if os.name == "nt"
|
||||
else self.executable, # Linux/Others
|
||||
else self.executable, # Others
|
||||
start_new_session=True,
|
||||
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0,
|
||||
)
|
||||
|
||||
@@ -206,13 +206,13 @@ def create_details_window(parent_widget, game_id=None):
|
||||
final_executable_split = shlex.split(
|
||||
final_executable, comments=False, posix=True
|
||||
)
|
||||
except Exception as e:
|
||||
except ValueError as exception:
|
||||
create_dialog(
|
||||
window,
|
||||
_("Couldn't Add Game")
|
||||
if game_id is None
|
||||
else _("Couldn't Apply Preferences"),
|
||||
f'{_("Executable")}: {e}.', # e = Shell parsing error message. Not translatable.
|
||||
f'{_("Executable")}: {exception}.',
|
||||
)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user