FYI, I initially found this bug when parse the packets:
pkt = packet.Packet(data)
for p in pkt.protocols:
print p
something_else()
if remove __str__() entirely, would the print work correctly?
2013/4/8 Isaku Yamahata <[email protected]>
> On Sun, Apr 07, 2013 at 04:06:22PM +0800, Can Zhang wrote:
> > Signed-off-by: Can Zhang <[email protected]>
> > ---
> > ryu/lib/packet/lldp.py | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/ryu/lib/packet/lldp.py b/ryu/lib/packet/lldp.py
> > index f82e00a..e6d77ba 100644
> > --- a/ryu/lib/packet/lldp.py
> > +++ b/ryu/lib/packet/lldp.py
> > @@ -103,7 +103,6 @@ class LLDPBasicTLV(object):
> > return self._LEN_MIN <= self.len and self.len <= self._LEN_MAX
> >
> > def __str__(self):
> > - self._typelen()
> > return super(LLDPBasicTLV, self).__str__()
>
> Good catch.
> Only calling object.__str__() doesn't make much sense.
> Can the method, __str__, be removed entirely from the class, LLDPBasicTLV?
> (or add meaningful implementation to LLDPBasicTLV.__str__)
>
> thanks,
>
> >
> >
> > --
> > 1.7.11.1
> >
> >
> >
> ------------------------------------------------------------------------------
> > Minimize network downtime and maximize team effectiveness.
> > Reduce network management and security costs.Learn how to hire
> > the most talented Cisco Certified professionals. Visit the
> > Employer Resources Portal
> > http://www.cisco.com/web/learning/employer_resources/index.html
> > _______________________________________________
> > Ryu-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ryu-devel
> >
>
> --
> yamahata
>
--
Best regards,
Can Zhang
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel