This patch (revised, please ignore the previous one: I forgot to specify
the UTF8 encoding) adds the missing bytes->str conversion for the 'name'
attribute, thus fixing the "'str' does not support the buffer interface
TypeError" under Python 3.
Also fixes the '/switches' method in ryu.app.rest_topology as an added side
effect.
Greetings,
-Fadi Moukayed
2015-10-07 12:34 GMT+02:00 Fadi Moukayed <[email protected]>:
> Signed-off-by: Fadi Moukayed <[email protected]>
> ---
> ryu/topology/switches.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ryu/topology/switches.py b/ryu/topology/switches.py
> index 5fe5d26..254c847 100644
> --- a/ryu/topology/switches.py
> +++ b/ryu/topology/switches.py
> @@ -87,7 +87,7 @@ class Port(object):
> return {'dpid': dpid_to_str(self.dpid),
> 'port_no': port_no_to_str(self.port_no),
> 'hw_addr': self.hw_addr,
> - 'name': self.name.rstrip('\0')}
> + 'name': str(self.name, 'UTF-8').rstrip('\0')}
>
> # for Switch.del_port()
> def __eq__(self, other):
> --
> 1.9.1
>
>
------------------------------------------------------------------------------
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel