From b9249e2ad528997b83eda956dd3800c1cc0373be Mon Sep 17 00:00:00 2001 From: Iam54r1n4 Date: Sat, 25 Jan 2025 15:07:07 +0000 Subject: [PATCH] Fix import bug --- core/scripts/webpanel/app.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/scripts/webpanel/app.py b/core/scripts/webpanel/app.py index 408a123..a58503e 100644 --- a/core/scripts/webpanel/app.py +++ b/core/scripts/webpanel/app.py @@ -7,12 +7,12 @@ from fastapi import Request from starlette.middleware.sessions import SessionMiddleware from starlette.staticfiles import StaticFiles -import routers -# Append directory of cli_api.py to be able to import it -HYSTERIA_CORE_DIR = '/etc/hysteria/core/' -sys.path.append(HYSTERIA_CORE_DIR) -# Now we can do `import cli_api` +HYSTERIA_CORE_DIR = '/etc/hysteria/core/' # Append directory of cli_api.py to be able to import it +sys.path.append(HYSTERIA_CORE_DIR) # Now we can do `import cli_api` + +# This import should be after the sys.path modification, because it imports cli_api +import routers # noqa # region Setup App app = FastAPI(debug=True)