clan_cli: Improve cli message if no networks present
This commit is contained in:
@@ -16,6 +16,9 @@ def overview_command(args: argparse.Namespace) -> None:
|
||||
for peer_name, peer in network["peers"].items():
|
||||
print(f"\t{peer_name}: {'[OFFLINE]' if not peer else f'[{peer}]'}")
|
||||
|
||||
if not overview:
|
||||
print("No networks found.")
|
||||
|
||||
|
||||
def register_overview_parser(parser: argparse.ArgumentParser) -> None:
|
||||
parser.set_defaults(func=overview_command)
|
||||
|
||||
@@ -16,8 +16,8 @@ def ping_command(args: argparse.Namespace) -> None:
|
||||
networks = networks_from_flake(flake)
|
||||
|
||||
if not networks:
|
||||
print("No networks found in the flake")
|
||||
|
||||
print("No networks found")
|
||||
return
|
||||
# If network is specified, only check that network
|
||||
if network_name:
|
||||
networks_to_check = [(network_name, networks[network_name])]
|
||||
|
||||
Reference in New Issue
Block a user