added version to the do_GET() call

This commit is contained in:
Mark McIntyre 2020-09-09 07:14:24 -04:00
parent 4f60c76c86
commit 24a090209e

View File

@ -48,9 +48,9 @@ class SimpleHandler(http.server.BaseHTTPRequestHandler):
self.end_headers()
if self.path != '/':
message = f"<html><body><h1>Hello, {self.path[1:]} World!</h1><p>1.0.0</p></body></html>"
message = f"<html><body><h1>Hello, {self.path[1:]} World!</h1><p>{version}</p></body></html>"
else:
message = "<html><body><h1>Hello, World!</h1><p>1.0.0</p></body></html>"
message = "<html><body><h1>Hello, World!</h1><p>{version}</p></body></html>"
self.wfile.write(bytes(message, encoding='utf-8'))
return