diff --git a/iptools/__init__.py b/iptools/__init__.py index 384fed1..414c93f 100644 --- a/iptools/__init__.py +++ b/iptools/__init__.py @@ -407,7 +407,7 @@ class IpRangeList (object): :type \*args: list of str and/or tuple """ def __init__(self, *args): - self.ips = tuple(map(IpRange, args)) + self.ips = tuple([IpRange(arg) for arg in args]) #end __init__ def __repr__(self): diff --git a/iptools/ipv4.py b/iptools/ipv4.py index 5696e7d..6280ee9 100644 --- a/iptools/ipv4.py +++ b/iptools/ipv4.py @@ -343,7 +343,7 @@ def validate_subnet(s): """ if isinstance(s, basestring): if '/' in s: - start, mask = s.split('/', 2) + start, mask = s.split('/', 1) return validate_ip(start) and validate_netmask(mask) else: return False