diff --git a/src/warnet/cli/network.py b/src/warnet/cli/network.py index cfa2f7f0d..a4143970d 100644 --- a/src/warnet/cli/network.py +++ b/src/warnet/cli/network.py @@ -57,7 +57,11 @@ def start(graph_file: Path, force: bool, network: str): "network_from_file", {"graph_file": encoded_graph_file, "force": force, "network": network}, ) - print_repr(result) + # It's a warnet + if type(result) == dict: + print_repr(result) + else: + print(result) except Exception as e: print(f"Error creating network: {e}") diff --git a/src/warnet/server.py b/src/warnet/server.py index 46c1f92ca..bc349330f 100644 --- a/src/warnet/server.py +++ b/src/warnet/server.py @@ -211,7 +211,7 @@ def scenarios_list(self) -> List[tuple]: scenario_list.append((s.name, m.cli_help())) return scenario_list except Exception as e: - return [f"Exception {e}"] + return [(f"Exception {e}", )] def scenarios_run( self, scenario: str, additional_args: List[str], network: str = "warnet" @@ -306,6 +306,7 @@ def network_from_file( """ Run a warnet with topology loaded from a """ + import pdb; pdb.set_trace() config_dir = gen_config_dir(network) if config_dir.exists(): if force: