diff --git a/management/ssl_certificates.py b/management/ssl_certificates.py index 5b9470ec..db36234c 100755 --- a/management/ssl_certificates.py +++ b/management/ssl_certificates.py @@ -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. diff --git a/management/status_checks.py b/management/status_checks.py index b584f9e1..bfc820df 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -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)