1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-08 16:27:24 +01:00

Fixed UP031 (printf-string-formatting): Use format specifiers instead of percent format

This commit is contained in:
Teal Dulcet
2025-01-12 06:36:07 -08:00
parent 1782b69405
commit 1d1a1a09c4
8 changed files with 29 additions and 29 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 %s requests in %d seconds." % (count, within_seconds))
raise Exception("Test failed to make {} requests in {:d} seconds.".format(count, within_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" % port)
header = ("PORT {:d}".format(port))
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:%s:%d" % (host, port), proxy])
proxy_proc = subprocess.Popen(["ssh", "-N", "-L10023:{}:{:d}".format(host, port), proxy])
time.sleep(3)
try: