diff options
author | selias <samelias@cisco.com> | 2016-05-20 13:51:48 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-05-30 10:09:35 +0000 |
commit | fdc6e0fc0c675eb4faa699fef7e1e2ca91df2b03 (patch) | |
tree | 04131831a5c50bc1965e6ffe9ad64cc7202c8a91 /resources/libraries/python/IPUtil.py | |
parent | f94e16167519c74707ec8b606da3f7b97c749c66 (diff) |
Update Honeycomb tests
- add new test cases based on reported bugs
- minor fixes
Change-Id: I8b7464bc1f4e786e3a0ef67ba64d81e1c25ae5cf
Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPUtil.py')
-rw-r--r-- | resources/libraries/python/IPUtil.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/libraries/python/IPUtil.py b/resources/libraries/python/IPUtil.py index 4b6e2766d8..e364e60cee 100644 --- a/resources/libraries/python/IPUtil.py +++ b/resources/libraries/python/IPUtil.py @@ -56,9 +56,9 @@ def convert_ipv4_netmask_prefix(network): net = IPv4Network(u"{0}/{1}".format(temp_address, network), False) if isinstance(network, int) and (0 < network < 33): - return net.netmask + return str(net.netmask) elif isinstance(network, basestring): - return net.prefixlen + return int(net.prefixlen) else: raise Exception("Value {0} is not a valid ipv4 netmask or network" " prefix length".format(network)) |