From c83eeabcda10b1368da90ce213f3e218fa5a934c Mon Sep 17 00:00:00 2001 From: vapao Date: Mon, 16 Aug 2021 21:38:14 +0800 Subject: [PATCH] fix issue --- 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 4597894..670f600 100644 --- a/spug_api/apps/host/utils.py +++ b/spug_api/apps/host/utils.py @@ -207,7 +207,7 @@ def fetch_host_extend(ssh): response['private_ip_address'].append(ip) elif index == 3: response['os_name'] = line - else: + elif line: response['disk'].append(round(int(line) / 1024 / 1024 / 1024, 0)) return response