Currently, 'dst_start_end' and 'src_start_end' in NXActionLearn
are not initialized before assignment to convert into string
representation.
This patch fixes this problem.

Signed-off-by: IWASE Yusuke <[email protected]>
---
 ryu/lib/ofctl_nicira_ext.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ryu/lib/ofctl_nicira_ext.py b/ryu/lib/ofctl_nicira_ext.py
index 3a5c6be..0cfa3a0 100644
--- a/ryu/lib/ofctl_nicira_ext.py
+++ b/ryu/lib/ofctl_nicira_ext.py
@@ -72,7 +72,7 @@ def action_to_str(act, ofctl_action_to_str):
 
                 else:
                     src = spec.src
-                    start_end = ''
+                    src_start_end = '[]'
 
                 if isinstance(spec.dst, (tuple, list)):
                     dst = spec.dst[0]
@@ -82,7 +82,7 @@ def action_to_str(act, ofctl_action_to_str):
 
                 else:
                     dst = spec.dst
-                    start_end = '[]'
+                    dst_start_end = '[]'
 
                 add_spec('NX_LOAD {%s%s: %s%s}' % (dst, dst_start_end,
                                                    src, src_start_end))
-- 
2.7.4


------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to