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:
@@ -1170,7 +1170,7 @@ class _NetlinkCache:
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
ifindex = link.ifindex
|
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
|
# check if this device is registered in the ignore list
|
||||||
with self._ignore_rtm_newlinkq_lock:
|
with self._ignore_rtm_newlinkq_lock:
|
||||||
@@ -1541,6 +1541,9 @@ class _NetlinkCache:
|
|||||||
except NetlinkCacheIfindexNotFoundError:
|
except NetlinkCacheIfindexNotFoundError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if isinstance(label, bytes):
|
||||||
|
label = label.decode()
|
||||||
|
|
||||||
return label, ifindex
|
return label, ifindex
|
||||||
|
|
||||||
def __check_and_replace_address(self, address_list, new_addr):
|
def __check_and_replace_address(self, address_list, new_addr):
|
||||||
|
Reference in New Issue
Block a user