handle app_version for source install using try/except (#111)
This commit is contained in:
parent
44c6b37db4
commit
5bf7e573c3
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue