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: try:
containers = get_containers(args.containers, args.present) containers = get_containers(args.containers, args.present)
except ConnectionRefusedError: except URLError as e:
critical('Failed to connect to daemon: connection refused.') critical(f'Failed to connect to daemon: {e.reason}.')
if len(containers) == 0 and not args.present: if len(containers) == 0 and not args.present:
unknown("No containers names found matching criteria") unknown("No containers names found matching criteria")