From a9d2c499bb90bcfd4baaebb55f8e3e6cf066c5d0 Mon Sep 17 00:00:00 2001 From: Smruti Ranjan Senapati Date: Wed, 17 Jul 2024 19:55:10 +0530 Subject: [PATCH] fix(networks): delete in use network --- riocli/network/delete.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/riocli/network/delete.py b/riocli/network/delete.py index 2ea7fc68..5ac84d6f 100644 --- a/riocli/network/delete.py +++ b/riocli/network/delete.py @@ -87,14 +87,14 @@ def delete_network( workers=workers, key=lambda x: x[0] ) data, statuses = [], [] - for name, status in result: + for name, status, msg in result: fg = Colors.GREEN if status else Colors.RED icon = Symbols.SUCCESS if status else Symbols.ERROR statuses.append(status) data.append([ click.style(name, fg), - click.style(icon, fg) + click.style('{} {}'.format(icon, msg), fg) ]) with spinner.hidden(): @@ -117,7 +117,7 @@ def delete_network( def _apply_delete(client: Client, result: Queue, network: Network) -> None: try: client.delete_network(network_name=network.metadata.name) - result.put((network.metadata.name, True)) + result.put((network.metadata.name, True, 'Network Deleted Successfully')) except Exception as e: click.secho() - result.put((network.metadata.name, False)) + result.put((network.metadata.name, False, str(e)))