From 789d35450cb5142b7ab9faf515afaf2b31dd56b8 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Wed, 1 Jan 2025 10:34:42 -0500 Subject: [PATCH] solaar: don't close temp file until after CLI call --- lib/solaar/gtk.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/solaar/gtk.py b/lib/solaar/gtk.py index 45357afa5..65ff13b9e 100755 --- a/lib/solaar/gtk.py +++ b/lib/solaar/gtk.py @@ -162,10 +162,11 @@ def main(): temp.close() return if args.action: + # if any argument, run comandline and exit + result = cli.run(args.action, args.hidraw_path) # explicit close before return temp.close() - # if any argument, run comandline and exit - return cli.run(args.action, args.hidraw_path) + return result gi = _require("gi", "python3-gi (in Ubuntu) or python3-gobject (in Fedora)") _require("gi.repository.Gtk", "gir1.2-gtk-3.0", gi, "Gtk", "3.0")