From 64d24b64acca10b666e2fc6526e210a0c2293c79 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 12 Nov 2021 17:05:34 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E6=94=B9=E8=BF=9B=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E6=89=A9=E5=B1=95=E4=BF=A1=E6=81=AF=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/host/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/host/utils.py b/spug_api/apps/host/utils.py index 44542c7..4333134 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -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: