1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-17 17:57:23 +01:00

Fixed UP032 (f-string): Use f-string instead of format call

This commit is contained in:
Teal Dulcet
2025-01-12 07:36:41 -08:00
parent ed2ad44408
commit 0564d1abc8
10 changed files with 30 additions and 33 deletions

View File

@@ -199,7 +199,7 @@ def run_test(testfunc, args, count, within_seconds, parallel):
# Did we make enough requests within the limit?
if (time.time()-start_time) > within_seconds:
raise Exception("Test failed to make {} requests in {:d} seconds.".format(count, within_seconds))
raise Exception(f"Test failed to make {count} requests in {within_seconds:d} seconds.")
# Wait a moment for the block to be put into place.
time.sleep(4)

View File

@@ -69,7 +69,7 @@ MOZILLA_CIPHERS_OLD = "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305
def sslyze(opts, port, ok_ciphers):
# Print header.
header = ("PORT {:d}".format(port))
header = (f"PORT {port:d}")
print(header)
print("-" * (len(header)))
@@ -83,7 +83,7 @@ def sslyze(opts, port, ok_ciphers):
proxy_proc = None
if proxy:
connection_string = "localhost:10023"
proxy_proc = subprocess.Popen(["ssh", "-N", "-L10023:{}:{:d}".format(host, port), proxy])
proxy_proc = subprocess.Popen(["ssh", "-N", f"-L10023:{host}:{port:d}", proxy])
time.sleep(3)
try: