Main entry point function for LeagueWizard.
Source code in src\leaguewizard\__init__.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | def main() -> None:
"""Main entry point function for LeagueWizard."""
LOG_DIR.mkdir(exist_ok=True, parents=True)
logger.add(
LOG_DIR / f"{datetime.now(timezone.utc).strftime('%Y-%m-%d_%H-%M-%S')}.log",
)
s = socket.socket()
try:
s.bind(("127.0.0.1", 13463))
except OSError as e:
raise LeWizardGenericError(
message="Another instance is already running",
show=True,
title="Error!",
terminate=True,
) from e
asyncio.run(start())
|