Files
Anthias/bin/wait.py
Viktor Petersson bf767e89dc feat: modernize Python codebase to 3.13+ minimum
- Set minimum Python version to 3.13, remove Python 2 compatibility
- Remove legacy imports: future, six, builtins, __future__, configparser,
  importlib-metadata, pep8, mock, unittest-parametrize
- Add modern type hints throughout (PEP 604 union syntax, PEP 585 generics)
- Replace .format() with f-strings, use super() without args
- Replace pytz with datetime.timezone, distutils.strtobool with inline impl
- Use conditional import for cec hardware dependency
- Clean up uv.lock (6 packages removed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 05:46:51 +00:00

20 lines
313 B
Python

import time
import sh
# wait for default route
def is_routing_up():
try:
sh.grep(sh.route(), 'default')
return True
except sh.ErrorReturnCode_1:
return False
for _ in range(1, 30):
if is_routing_up():
break
print('Waiting for to come up...')
time.sleep(1)