fix: version reading
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user