mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
python3: nlcache: keeping ifname as str (and not bytes) to keep the cache working with minimal disruption
Spoiler alert: it is still super disrupted. Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -1170,7 +1170,12 @@ class _NetlinkCache:
|
||||
:return:
|
||||
"""
|
||||
ifindex = link.ifindex
|
||||
ifname = link.get_attribute_value(Link.IFLA_IFNAME).decode("ascii")
|
||||
|
||||
try:
|
||||
ifname = link.get_attribute_value(Link.IFLA_IFNAME).decode()
|
||||
except AttributeError:
|
||||
# ifname is already a string we don't need to decode it
|
||||
ifname = link.get_attribute_value(Link.IFLA_IFNAME)
|
||||
|
||||
# check if this device is registered in the ignore list
|
||||
with self._ignore_rtm_newlinkq_lock:
|
||||
|
Reference in New Issue
Block a user