1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

python3: nlcache: cache key (ifname) should of type str not bytes

Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
Julien Fortin
2019-10-02 17:11:47 +02:00
parent 54de334242
commit 7f87d9d869

View File

@@ -1170,7 +1170,7 @@ class _NetlinkCache:
:return:
"""
ifindex = link.ifindex
ifname = link.get_attribute_value(Link.IFLA_IFNAME)
ifname = link.get_attribute_value(Link.IFLA_IFNAME).decode("ascii")
# check if this device is registered in the ignore list
with self._ignore_rtm_newlinkq_lock:
@@ -1541,6 +1541,9 @@ class _NetlinkCache:
except NetlinkCacheIfindexNotFoundError:
pass
if isinstance(label, bytes):
label = label.decode()
return label, ifindex
def __check_and_replace_address(self, address_list, new_addr):