solaar: don't close temp file until after CLI call

This commit is contained in:
Peter F. Patel-Schneider 2025-01-01 10:34:42 -05:00
parent 62e8aacd9f
commit 789d35450c
1 changed files with 3 additions and 2 deletions

View File

@ -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")