diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq index ff07afd..bdc58b2 100755 --- a/bin/auto-cpufreq +++ b/bin/auto-cpufreq @@ -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() diff --git a/source/core.py b/source/core.py index 602227f..181a7be 100644 --- a/source/core.py +++ b/source/core.py @@ -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()