fix error class
This commit is contained in:
parent
5d1aa8e642
commit
40380b67e0
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue