raise Error on import

This commit is contained in:
flukx 2024-08-18 08:26:54 +02:00
parent 26eee37757
commit 77af2a4b46

View file

@ -381,10 +381,12 @@ def show_part_changer(ui_element: nicegui.ui.element, part: Part) -> None:
# if __name__ in {"__main__", "__mp_main__"}:
nicegui.app.add_static_files('/images_landscape', 'images_landscape')
ui.run(title="Fahrradteile",
favicon="website_resources/favicon.ico",
language="de",
host=gl_options.host,
port=gl_options.port)
if __name__ not in {"__main__", "__mp_main__"}:
raise ImportError(f"{__name__} cannot be used as a module, just as a callable program.")