Merge "Fix compatibility issue when using netifaces"

This commit is contained in:
Zuul 2018-01-19 10:55:54 +00:00 committed by Gerrit Code Review
commit 9bbdd8edeb
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ def get_local_himn_eth_via_ip(ip_in_himn, eths=None):
ipv4s = netifaces.ifaddresses(eth).get(netifaces.AF_INET, [])
for ipv4 in ipv4s:
net_if = ipaddress.IPv4Interface(
ipv4['addr'] + '/' + ipv4['netmask'])
ipv4['addr'] + u'/' + ipv4['netmask'])
if isinstance(ip_in_himn, bytes):
ip_in_himn = ip_in_himn.decode('utf-8')
hint_himn_ipaddr = ipaddress.ip_address(ip_in_himn)