mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-07-03 11:42:47 -05:00
tests: fixed string formatting in Python version earlier than 2.6
This commit is contained in:

committed by
Michał Trojnara

parent
7b60d6447d
commit
c909ba82d7
@ -53,7 +53,7 @@ class RequestHandler(SimpleHTTPRequestHandler):
|
||||
resp_data = file.read()
|
||||
self.wfile.write(resp_data)
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
print(f"HTTP GET request error: {err}")
|
||||
print("HTTP GET request error: {}".format(err))
|
||||
|
||||
|
||||
def do_POST(self): # pylint: disable=invalid-name
|
||||
@ -83,7 +83,7 @@ class RequestHandler(SimpleHTTPRequestHandler):
|
||||
resp_data = file.read()
|
||||
self.wfile.write(resp_data)
|
||||
except Exception as err: # pylint: disable=broad-except
|
||||
print(f"HTTP POST request error: {err}")
|
||||
print("HTTP POST request error: {}".format(err))
|
||||
|
||||
|
||||
class HttpServerThread():
|
||||
@ -100,7 +100,7 @@ class HttpServerThread():
|
||||
self.server_thread = threading.Thread(target=self.server.serve_forever)
|
||||
self.server_thread.start()
|
||||
hostname, port = self.server.server_address[:2]
|
||||
print(f"HTTP server started, URL http://{hostname}:{port}")
|
||||
print("HTTP server started, URL http://{}:{}".format(hostname, port))
|
||||
return port
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ def main() -> None:
|
||||
with open(PORT_LOG, mode="w") as file:
|
||||
file.write("{}".format(port))
|
||||
except OSError as err:
|
||||
print(f"OSError: {err}")
|
||||
print("OSError: {}".format(err))
|
||||
ret = err.errno
|
||||
finally:
|
||||
sys.exit(ret)
|
||||
|
Reference in New Issue
Block a user