Skip to content

Commit

Permalink
Tunnel print CommandError message clean
Browse files Browse the repository at this point in the history
  • Loading branch information
miroberts authored and sk-keeper committed Jan 16, 2024
1 parent 9cc490a commit 5a6c211
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion keepercommander/commands/discoveryrotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 5a6c211

Please sign in to comment.