Blame SOURCES/cobbler-netaddr.patch

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