From 5a6c21178aefd2120cf517da7e9ca71bc660670c Mon Sep 17 00:00:00 2001 From: Micah Roberts Date: Tue, 16 Jan 2024 10:11:37 -0700 Subject: [PATCH] Tunnel print CommandError message clean --- keepercommander/commands/discoveryrotation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keepercommander/commands/discoveryrotation.py b/keepercommander/commands/discoveryrotation.py index 30d4bc620..81ca3f5a8 100644 --- a/keepercommander/commands/discoveryrotation.py +++ b/keepercommander/commands/discoveryrotation.py @@ -1661,6 +1661,7 @@ def execute(self, params, **kwargs): if not tunnel_data: raise CommandError('tunnel stop', f"No tunnel data to remove found for {convo_id}") clean_up_tunnel(params, convo_id) + return @@ -1890,8 +1891,10 @@ def custom_exception_handler(loop, context): print(f"{bcolors.FAIL}Socket not connected exception in connection {convo_id}: {es}{bcolors.ENDC}") except KeyboardInterrupt: print(f"{bcolors.OKBLUE}Exiting: {convo_id}{bcolors.ENDC}") + except CommandError as ce: + print(f"{bcolors.FAIL}{ce}{bcolors.ENDC}") except Exception as e: - print(f"{bcolors.FAIL}An exception occurred in pre_connect for connection {convo_id}: {e}{bcolors.ENDC}") + print(f"{bcolors.FAIL}An exception occurred in connection {convo_id}: {e}{bcolors.ENDC}") finally: if loop: try: