1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-01-23 12:37:05 +00:00

Fixed RUF010 (explicit-f-string-type-conversion): Use explicit conversion flag

This commit is contained in:
Teal Dulcet 2025-01-08 05:23:12 -08:00
parent 350b5b035a
commit 385ac086e6
2 changed files with 2 additions and 2 deletions

View File

@ -515,7 +515,7 @@ def check_certificate(domain, ssl_certificate, ssl_private_key, warn_if_expiring
cert = load_pem(ssl_cert_chain[0])
if not isinstance(cert, Certificate): raise ValueError("This is not a certificate file.")
except ValueError as e:
return (f"There is a problem with the certificate file: {str(e)}", None)
return (f"There is a problem with the certificate file: {e!s}", None)
# First check that the domain name is one of the names allowed by
# the certificate.

View File

@ -248,7 +248,7 @@ def check_free_disk_space(rounded_values, env, output):
def check_free_memory(rounded_values, env, output):
# Check free memory.
percent_free = 100 - psutil.virtual_memory().percent
memory_msg = f"System memory is {str(round(percent_free))}% free."
memory_msg = f"System memory is {round(percent_free)!s}% free."
if percent_free >= 20:
if rounded_values: memory_msg = "System free memory is at least 20%."
output.print_ok(memory_msg)