Blame SOURCES/cobbler-netaddr.patch

1070a0
--- ./cobbler/utils.py	2011-08-23 17:19:24.442680062 +0200
1070a0
+++ ./cobbler/utils.py	2011-08-23 17:19:37.466012392 +0200
1070a0
@@ -186,8 +186,9 @@ def get_host_ip(ip, shorten=True):
1070a0
         ip = netaddr.IP(ip)
1070a0
         cidr = ip.cidr()
1070a0
     else:
1070a0
-        ip = netaddr.ip.IPAddress(ip)
1070a0
-        cidr = netaddr.ip.IPNetwork(ip)
1070a0
+        ipnet = netaddr.IPNetwork(ip)
1070a0
+        ip = ipnet.ip
1070a0
+        cidr = ipnet.cidr
1070a0
 
1070a0
     if len(cidr) == 1: # Just an IP, e.g. a /32
1070a0
         return pretty_hex(ip)
1070a0
@@ -210,7 +211,7 @@ def _IP(ip):
1070a0
    if NETADDR_PRE_0_7:
1070a0
        ip_class = netaddr.IP
1070a0
    else:
1070a0
-        ip_class = netaddr.ip.IPAddress
1070a0
+       ip_class = netaddr.ip.IPNetwork
1070a0
    if isinstance(ip, ip_class) or ip == "":
1070a0
       return ip
1070a0
    else: