Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
BoPeng committed Feb 14, 2024
1 parent f37ed56 commit 9b3c4b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sos/hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 9b3c4b2

Please sign in to comment.