mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-06 07:29:30 +00:00
Remove git hash info (#1129)
This commit is contained in:
parent
ef6cd97656
commit
5414a78098
|
@ -21,23 +21,8 @@ class SysCmds:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def running_env():
|
def running_env():
|
||||||
"""
|
"""
|
||||||
Returns (str) git and (str) env
|
Returns (str) env, with details on the system hardware and software
|
||||||
git contains the git hash of the checked out code
|
|
||||||
env is the various system information where this app is running
|
|
||||||
"""
|
"""
|
||||||
try:
|
|
||||||
ra_git_version = (
|
|
||||||
subprocess.run(
|
|
||||||
["git", "rev-parse", "HEAD"],
|
|
||||||
capture_output=True,
|
|
||||||
check=True,
|
|
||||||
)
|
|
||||||
.stdout.decode("utf-8")
|
|
||||||
.strip()
|
|
||||||
)
|
|
||||||
except subprocess.CalledProcessError as error:
|
|
||||||
logging.warning(SHELL_ERROR, error.cmd, error.stderr.decode("utf-8"))
|
|
||||||
ra_git_version = ""
|
|
||||||
|
|
||||||
PROC_MODEL_PATH = "/proc/device-tree/model"
|
PROC_MODEL_PATH = "/proc/device-tree/model"
|
||||||
SYS_VENDOR_PATH = "/sys/devices/virtual/dmi/id/sys_vendor"
|
SYS_VENDOR_PATH = "/sys/devices/virtual/dmi/id/sys_vendor"
|
||||||
|
@ -67,7 +52,6 @@ class SysCmds:
|
||||||
|
|
||||||
env = uname()
|
env = uname()
|
||||||
return {
|
return {
|
||||||
"git": ra_git_version,
|
|
||||||
"env": f"{hardware}, {env.system} {env.release} {env.machine}",
|
"env": f"{hardware}, {env.system} {env.release} {env.machine}",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ _("PiSCSI version:") }} <b>{{ env["version"] }} <a href="https://github.com/PiSCSI/piscsi/commit/{{ env["running_env"]["git"] }}" target="_blank">{{ env["running_env"]["git"][:7] }}</a></b>
|
{{ _("PiSCSI software version:") }} <b>{{ env["version"] }}</b>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ _("Hardware and OS:") }} {{ env["running_env"]["env"] }}
|
{{ _("Hardware and OS:") }} {{ env["running_env"]["env"] }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user