From 54621724149a6b0e573353543a94fef2b260708d Mon Sep 17 00:00:00 2001 From: liuheng Date: Thu, 13 Apr 2023 09:10:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9CheckEtcHosts=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/gspylib/inspection/items/os/CheckEtcHosts.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/script/gspylib/inspection/items/os/CheckEtcHosts.py b/script/gspylib/inspection/items/os/CheckEtcHosts.py index e0f4a77..f6d1c9b 100644 --- a/script/gspylib/inspection/items/os/CheckEtcHosts.py +++ b/script/gspylib/inspection/items/os/CheckEtcHosts.py @@ -68,18 +68,10 @@ class CheckEtcHosts(BaseItem): flag = "Error_conflicts" else: IPMapping[ip] = host - if (len(IPInfo.split()) > 2 and IPInfo.split()[2] == "#Gauss"): - commentsMapping.append(IPInfo + " IP Hosts Mapping") - flag = "Error_comments" if (flag == "Normal"): self.result.rst = ResultStatus.OK self.result.val = "The /etc/hosts is configured correctly." - elif (flag == "Error_comments"): - self.result.rst = ResultStatus.NG - self.result.val = "The /etc/hosts has comments Mapping:\n" \ - + "\n".join( - commentsMapping) else: self.result.rst = ResultStatus.NG self.result.val = "The /etc/hosts has conflicts Mapping:\n" \ -- Gitee