Signed-off-by: itoyuichi <[email protected]>
---
 ryu/lib/packet/ipv6.py |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ryu/lib/packet/ipv6.py b/ryu/lib/packet/ipv6.py
index ca5793d..4131491 100644
--- a/ryu/lib/packet/ipv6.py
+++ b/ryu/lib/packet/ipv6.py
@@ -68,7 +68,7 @@ class ipv6(packet_base.PacketBase):
         return _register_header_type

     def __init__(self, version, traffic_class, flow_label, payload_length,
-                 nxt, hop_limit, src, dst, ext_hdrs=[]):
+                 nxt, hop_limit, src, dst, ext_hdrs=None):
         super(ipv6, self).__init__()
         self.version = version
         self.traffic_class = traffic_class
@@ -78,10 +78,10 @@ class ipv6(packet_base.PacketBase):
         self.hop_limit = hop_limit
         self.src = src
         self.dst = dst
-        if ext_hdrs:
-            assert isinstance(ext_hdrs, list)
-            for ext_hdr in ext_hdrs:
-                assert isinstance(ext_hdr, header)
+        ext_hdrs = ext_hdrs or []
+        assert isinstance(ext_hdrs, list)
+        for ext_hdr in ext_hdrs:
+            assert isinstance(ext_hdr, header)
         self.ext_hdrs = ext_hdrs

     @classmethod
-- 
1.7.10.4


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to