From a072730fb81fe8cefe25ada881468e39d11487a9 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Mon, 3 Apr 2017 22:53:53 +0200 Subject: [PATCH] Wrap normalize_ip in try..except (#1139) closes #1134 --- management/status_checks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/management/status_checks.py b/management/status_checks.py index d29e89ef..42fc876a 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -894,7 +894,10 @@ def run_and_output_changes(env, pool): 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)) + try: + return str(ipaddress.ip_address(ip)) + except: + return ip class FileOutput: def __init__(self, buf, width):