1
0
mirror of https://github.com/nginx-proxy/nginx-proxy synced 2024-11-08 15:59:17 +01:00

Merge pull request #2432 from SchoNie/webserver-syntaxwarning-fix

fix: tests webserver syntaxwarning
This commit is contained in:
Nicolas Duchon 2024-05-03 11:08:46 +02:00 committed by GitHub
commit 43b8ab82a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,8 +14,8 @@ class Handler(http.server.SimpleHTTPRequestHandler):
response_body += self.headers.as_string()
elif self.path == "/port":
response_body += f"answer from port {PORT}\n"
elif re.match("/status/(\d+)", self.path):
result = re.match("/status/(\d+)", self.path)
elif re.match(r"/status/(\d+)", self.path):
result = re.match(r"/status/(\d+)", self.path)
response_code = int(result.group(1))
response_body += f"answer with response code {response_code}\n"
elif self.path == "/":