handle app_version for source install using try/except (#111)

This commit is contained in:
Adnan Hodzic 2020-09-13 20:23:43 +02:00
parent 44c6b37db4
commit 5bf7e573c3
2 changed files with 6 additions and 3 deletions

View File

@ -92,8 +92,7 @@ def main(monitor, live, daemon, install, log, debug):
if os.getenv('PKG_MARKER') == "SNAP":
print("Snap package: yes")
else:
# temp disabled (Issue: #111)
# app_version()
app_version()
print("Snap package: no")
print("")
python_info()

View File

@ -44,8 +44,12 @@ auto_cpufreq_log_file_snap = Path("/var/snap/auto-cpufreq/current/auto-cpufreq.l
dcheck = getoutput("snapctl get daemon")
# ToDo: read version from snap/snapcraft.yaml and write to $SNAP/version for use with snap installs
# also come up with same kind of solution for AUR
def app_version():
print("Build git commit:", check_output(["git", "describe", "--always"]).strip().decode())
try:
print("Build git commit:", check_output(["git", "describe", "--always"]).strip().decode())
except:
pass
def app_res_use():
p = psutil.Process()