Skip to content

Commit

Permalink
fix:deprecate is_connected (#273)
Browse files Browse the repository at this point in the history
closes #272
  • Loading branch information
JarbasAl authored Oct 15, 2024
1 parent 38dab93 commit 93eab83
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit 93eab83

Please sign in to comment.