fix error class

This commit is contained in:
Cyberes 2023-05-03 12:26:02 -06:00
parent 5d1aa8e642
commit 40380b67e0
1 changed files with 2 additions and 2 deletions

View File

@ -937,8 +937,8 @@ def perform_checks(raw_args):
#############################################################################################
try:
containers = get_containers(args.containers, args.present)
except ConnectionRefusedError:
critical('Failed to connect to daemon: connection refused.')
except URLError as e:
critical(f'Failed to connect to daemon: {e.reason}.')
if len(containers) == 0 and not args.present:
unknown("No containers names found matching criteria")