import string_utils
from ansi import bg, fg, reset, underline
from decorator_utils import singleton
-from exec_utils import cmd_in_background, cmd_with_timeout, run_silently
+from exec_utils import cmd_exitcode, cmd_in_background, run_silently
from thread_utils import background_thread
logger = logging.getLogger(__name__)
def _ping(host) -> bool:
logger.debug('RUN> ping -c 1 %s', host)
try:
- x = cmd_with_timeout(f'ping -c 1 {host} >/dev/null 2>/dev/null', timeout_seconds=1.0)
+ x = cmd_exitcode(f'ping -c 1 {host} >/dev/null 2>/dev/null', timeout_seconds=1.0)
return x == 0
except Exception:
return False