From 9b3c4b28d05e6702942f9bc49e1c254b87603698 Mon Sep 17 00:00:00 2001 From: Bo Peng Date: Tue, 13 Feb 2024 22:50:09 -0600 Subject: [PATCH] Fix pylint --- src/sos/hosts.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sos/hosts.py b/src/sos/hosts.py index cc7c633f2..ea530957c 100755 --- a/src/sos/hosts.py +++ b/src/sos/hosts.py @@ -782,7 +782,7 @@ def _get_local_host(self) -> str: # # check if a key localhost is defined if "localhost" in env.sos_dict["CONFIG"]: - if (env.sos_dict["CONFIG"]["localhost"] not in env.sos_dict["CONFIG"]["hosts"]): + if env.sos_dict["CONFIG"]["localhost"] not in env.sos_dict["CONFIG"]["hosts"]: raise ValueError(f"Undefined localhost {env.sos_dict['CONFIG']['localhost']}") return env.sos_dict["CONFIG"]["localhost"] env.sos_dict["CONFIG"]["localhost"] = "localhost" @@ -872,7 +872,6 @@ def normalize_value(x): common = set(cfg[LOCAL]["shared"].keys()) & set(cfg[REMOTE]["shared"].keys()) if common: lcl_shrd = get_config("hosts", LOCAL, "shared", expected_type=dict) - rmt_shrd = get_config("hosts", REMOTE, "shared", expected_type=dict) self.config["shared"] = [normalize_value(lcl_shrd[x]) for x in common] if "pem_file" in cfg[LOCAL]: if isinstance(cfg[LOCAL]["pem_file"], dict):