diff --git a/tobiko/shell/ping/_ping.py b/tobiko/shell/ping/_ping.py index d42ed83ab..c6a03fb23 100644 --- a/tobiko/shell/ping/_ping.py +++ b/tobiko/shell/ping/_ping.py @@ -219,7 +219,8 @@ def execute_ping(parameters, ssh_client=None, check=True, **params): command = get_ping_command(parameters) result = sh.execute(command=command, ssh_client=ssh_client, timeout=parameters.timeout, check=False) - if check and result.exit_status: + + if check and result.exit_status and result.stderr: handle_ping_command_error(error=result.stderr) return result