mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-06-09 19:10:54 +00:00
Made stylistic changes
This commit is contained in:
parent
e97d753e5a
commit
719166f7a3
@ -4,7 +4,7 @@
|
|||||||
import os, os.path, re, shutil
|
import os, os.path, re, shutil
|
||||||
|
|
||||||
from utils import shell, safe_domain_name, sort_domains
|
from utils import shell, safe_domain_name, sort_domains
|
||||||
|
from status_checks import normalize_ip
|
||||||
import idna
|
import idna
|
||||||
|
|
||||||
# SELECTING SSL CERTIFICATES FOR USE IN WEB
|
# SELECTING SSL CERTIFICATES FOR USE IN WEB
|
||||||
@ -802,10 +802,6 @@ def get_certificate_domains(cert):
|
|||||||
|
|
||||||
return names, cn
|
return names, cn
|
||||||
|
|
||||||
def normalize_ip(ip):
|
|
||||||
import ipaddress
|
|
||||||
return str(ipaddress.ip_address(ip))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Provision certificates.
|
# Provision certificates.
|
||||||
provision_certificates_cmdline()
|
provision_certificates_cmdline()
|
||||||
|
@ -885,6 +885,7 @@ def run_and_output_changes(env, pool):
|
|||||||
json.dump(cur.buf, f, indent=True)
|
json.dump(cur.buf, f, indent=True)
|
||||||
|
|
||||||
def normalize_ip(ip):
|
def normalize_ip(ip):
|
||||||
|
# Use ipaddress module to normalize the IPv6 notation and ensure we are matching IPv6 addresses written in different representations according to rfc5952.
|
||||||
import ipaddress
|
import ipaddress
|
||||||
return str(ipaddress.ip_address(ip))
|
return str(ipaddress.ip_address(ip))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user