add SIM lint
This commit is contained in:
@@ -27,7 +27,7 @@ def create_machine(flake: FlakeId, machine: Machine) -> None:
|
||||
|
||||
full_inventory = load_inventory_eval(flake.path)
|
||||
|
||||
if machine.name in full_inventory.machines.keys():
|
||||
if machine.name in full_inventory.machines:
|
||||
msg = f"Machine with the name {machine.name} already exists"
|
||||
raise ClanError(msg)
|
||||
|
||||
|
||||
@@ -166,10 +166,7 @@ def find_reachable_host_from_deploy_json(deploy_json: dict[str, str]) -> str:
|
||||
host = None
|
||||
for addr in deploy_json["addrs"]:
|
||||
if is_reachable(addr):
|
||||
if is_ipv6(addr):
|
||||
host = f"[{addr}]"
|
||||
else:
|
||||
host = addr
|
||||
host = f"[{addr}]" if is_ipv6(addr) else addr
|
||||
break
|
||||
if not host:
|
||||
msg = f"""
|
||||
|
||||
Reference in New Issue
Block a user