U 改进获取主机扩展信息兼容性

pull/410/head
vapao 2021-11-12 17:05:34 +08:00
parent 69d5bf74e5
commit 64d24b64ac
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ def fetch_host_extend(ssh):
if '/etc/os-release' in out:
code, out = ssh.exec_command_raw("cat /etc/issue | head -1 | awk '{print $1,$2,$3}'")
if code == 0:
response['os_name'] = out.strip()
response['os_name'] = out.strip()[:50]
code, out = ssh.exec_command_raw('hostname -I')
if code == 0: