mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
addons: bridge: fix error: write() argument must be str, not int
make sure to convert the mtu received via policy file back to string before using it in the bridge module. Signed-off-by: Julien Fortin <jfortin@nvidia.com>
This commit is contained in:
@ -2470,7 +2470,7 @@ class bridge(Bridge, moduleBase):
|
|||||||
if user_config_mtu:
|
if user_config_mtu:
|
||||||
int(user_config_mtu)
|
int(user_config_mtu)
|
||||||
self.logger.info("%s: set bridge mtu %s" % (ifaceobj.name, user_config_mtu))
|
self.logger.info("%s: set bridge mtu %s" % (ifaceobj.name, user_config_mtu))
|
||||||
return user_config_mtu
|
return str(user_config_mtu)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.warning("%s: invalid bridge mtu %s: %s" % (ifaceobj.name, user_config_mtu, str(e)))
|
self.logger.warning("%s: invalid bridge mtu %s: %s" % (ifaceobj.name, user_config_mtu, str(e)))
|
||||||
return None
|
return None
|
||||||
|
Reference in New Issue
Block a user