Signed-off-by: WATANABE Fumitaka <[email protected]>
---
ryu/lib/packet/packet.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/ryu/lib/packet/packet.py b/ryu/lib/packet/packet.py
index 84e5bf8..23b5ac5 100644
--- a/ryu/lib/packet/packet.py
+++ b/ryu/lib/packet/packet.py
@@ -95,3 +95,12 @@ class Packet(object):
def __iter__(self):
return self
+
+ def __str__(self):
+ buf = ''
+ for protocol in self.protocols:
+ if buf != '':
+ buf += ', '
+ buf += str(protocol)
+ return buf
+ __repr__ = __str__ # note: str(list) uses __repr__ for elements
-- 1.7.10.4
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel