mirror of
https://github.com/Screenly/Anthias.git
synced 2026-01-15 09:38:16 -05:00
22 lines
417 B
Python
22 lines
417 B
Python
from __future__ import print_function
|
|
from __future__ import unicode_literals
|
|
from builtins import range
|
|
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)
|