Added suggestions from @whot

Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
pull/296/head
Florian "sp1rit 2022-11-14 10:45:39 +00:00 committed by Florian "sp1rit"​
parent 535f4c0573
commit 9514ac6418
No known key found for this signature in database
GPG Key ID: 7D8C1CD573166D09
2 changed files with 6 additions and 8 deletions

View File

@ -18,9 +18,11 @@ from gi.repository import Gio
@devel@ # NOQA
if "TUHI_DEVEL" in os.environ:
resource = Gio.resource_load(os.fspath(Path(os.environ["TUHI_DEVEL"], 'data', 'tuhi.gresource')))
resource_path = Path(os.environ["TUHI_DEVEL"], 'data', 'tuhi.gresource')
else:
resource = Gio.resource_load(os.fspath(Path('@pkgdatadir@', 'tuhi.gresource')))
resource_path = Path('@pkgdatadir@', 'tuhi.gresource')
resource = Gio.resource_load(os.fspath(resource_path))
Gio.Resource._register(resource)

View File

@ -17,12 +17,8 @@ import subprocess
from pathlib import Path
import argparse
if "TUHI_DEVEL" in os.environ:
tuhi_server = Path(os.environ["TUHI_DEVEL"], 'tuhi-server')
tuhi_gui = Path(os.environ["TUHI_DEVEL"], 'tuhi-gui')
else:
tuhi_server = Path('@libexecdir@', 'tuhi-server')
tuhi_gui = Path('@libexecdir@', 'tuhi-gui')
tuhi_server = Path(os.environ.get("TUHI_DEVEL", "@libexecdir@"), 'tuhi-server')
tuhi_gui = Path(os.environ.get("TUHI_DEVEL", "@libexecdir@"), 'tuhi-gui')
@devel@ # NOQA