Fix errors couting

This commit is contained in:
Benjamin Renard 2022-10-26 12:54:30 +02:00 committed by root
parent ba67bb368b
commit 7bfbcfe63c

View file

@ -95,10 +95,12 @@ for dev in devices_data['configured']:
f'({dev["deployed_version"]} => {dev["current_version"]})')
if dev['configuration'] not in ping_data:
NO_PING_DATA += 1
errors.append(
f'No ping data found for device {dev["name"]} '
f'({dev["configuration"]})')
elif not ping_data[dev['configuration']]:
UNREACHABLE_DEVICES += 1
errors.append(f'Device {dev["name"]} is unreachable')
if not errors: