Cleanups
This commit is contained in:
@@ -24,9 +24,8 @@ from gi.repository import Gio
|
||||
|
||||
|
||||
def run_command(executable):
|
||||
subprocess.Popen(
|
||||
with subprocess.Popen(
|
||||
["flatpak-spawn --host " + executable], shell=True, start_new_session=True
|
||||
)
|
||||
|
||||
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
|
||||
sys.exit()
|
||||
):
|
||||
if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
|
||||
sys.exit()
|
||||
|
||||
@@ -30,7 +30,9 @@ def toggle_hidden(game):
|
||||
with open(os.path.join(games_dir, game + ".json"), "r") as open_file:
|
||||
data = json.loads(open_file.read())
|
||||
open_file.close()
|
||||
|
||||
data["hidden"] = not data["hidden"]
|
||||
|
||||
with open(os.path.join(games_dir, game + ".json"), "w") as open_file:
|
||||
data["hidden"] = not data["hidden"]
|
||||
open_file.write(json.dumps(data, indent=4))
|
||||
open_file.close()
|
||||
|
||||
Reference in New Issue
Block a user