Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:deprecate is_connected #273

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ovos_utils/network_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import requests

from ovos_utils.log import LOG
from ovos_utils.log import LOG, deprecated

_DEFAULT_TEST_CONFIG = {
"ip_url": 'https://api.ipify.org',
Expand Down Expand Up @@ -108,11 +108,12 @@ def is_connected_http(host: Optional[str] = None) -> bool:
return False


@deprecated("use is_connected_http or is_connected_dns directly depending on your use case", "2.0.0")
def is_connected() -> bool:
"""
Return True if any connection check (DNS or HTTP) is True
alias for is_connected_http()
"""
return any((is_connected_dns(), is_connected_http()))
return is_connected_http()


def check_captive_portal(host: Optional[str] = None,
Expand Down
Loading