1
0
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:
Jonathan Chun 2017-01-06 15:04:44 -05:00
parent e97d753e5a
commit 719166f7a3
2 changed files with 2 additions and 5 deletions

View File

@ -4,7 +4,7 @@
import os, os.path, re, shutil
from utils import shell, safe_domain_name, sort_domains
from status_checks import normalize_ip
import idna
# SELECTING SSL CERTIFICATES FOR USE IN WEB
@ -802,10 +802,6 @@ def get_certificate_domains(cert):
return names, cn
def normalize_ip(ip):
import ipaddress
return str(ipaddress.ip_address(ip))
if __name__ == "__main__":
# Provision certificates.
provision_certificates_cmdline()

View File

@ -885,6 +885,7 @@ def run_and_output_changes(env, pool):
json.dump(cur.buf, f, indent=True)
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
return str(ipaddress.ip_address(ip))