fix: version reading

This commit is contained in:
2026-04-12 18:20:55 +02:00
parent 213a311fd9
commit 55a59b36d9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class RequestHandler(http.server.SimpleHTTPRequestHandler):
server_version = "StaplerServer/" + project.get_version()
CERTBOT_CHALLENGE_PATH = "/.well-known/acme-challenge"
PATH_REGEX = re.compile(r"^\/([\w-]+)\/")
HOST_PART_REGEX = re.compile(r"^[a-zA-Z0-9]*[a-zA-Z0-9][a-zA-Z0-9]$")
HOST_PART_REGEX = re.compile(r"^([a-zA-Z0-9]|[a-zA-Z0-9]*[a-zA-Z0-9][a-zA-Z0-9])$")
HOST_PORT_REGEX = re.compile(r"^\d{2,5}$")
@typing.override
+1 -1
View File
@@ -5,7 +5,7 @@ import toml
def __get_project_data() -> None | dict[str, typing.Any]:
pyproject_toml_file = pathlib.Path(__file__) / ".." / ".." / "pyproject.toml"
pyproject_toml_file = pathlib.Path(__file__).parent.parent / "pyproject.toml"
if pyproject_toml_file.is_file():
try:
data = toml.load(pyproject_toml_file)