Do not log an error when a host is unreachable while pinging (#40024)

This commit is contained in:
J. Nick Koston 2020-09-13 09:44:37 -05:00 committed by Paulus Schoutsen
parent 4c2788a13c
commit 4ee7cdc8a0

View File

@ -210,7 +210,8 @@ class PingDataSubProcess(PingData):
out_error, out_error,
) )
if pinger.returncode != 0: if pinger.returncode > 1:
# returncode of 1 means the host is unreachable
_LOGGER.exception( _LOGGER.exception(
"Error running command: `%s`, return code: %s", "Error running command: `%s`, return code: %s",
" ".join(self._ping_cmd), " ".join(self._ping_cmd),