INNER CODE UNIT · Python
_ensure_internet_connection
cunarist/solie · package/solie/window/main.py:196
async def _ensure_internet_connection(self) -> None:
"""Wait for internet connection to be established."""
await start_monitoring_internet()
while not internet_connected():
await ask(
"No internet connection",
"Internet connection is necessary for Solie to start up.",
["Retry"],
)
await sleep(1.0)
async def _load_or_create_datapath(self) -> None:
"""Load existing datapath or prompt user to create one."""
datapath = await read_datapath()
if not datapath:
datapath = await overlay(DatapathInput())
await save_datapath(datapath)
self.datapath = datapath