mirror of
https://github.com/Screenly/Anthias.git
synced 2026-04-18 05:29:47 -04:00
- 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>
20 lines
313 B
Python
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)
|