diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-08-08 16:49:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-08-19 17:48:46 +0900 |
commit | 8c5071e2db3c62fac99a189e3bf7a76a8f4d1413 (patch) | |
tree | c1ba3c5354ea221a754fed1b75c25b8269c341b7 | |
parent | fbafa4b95014a02850387598b10ed3b289412f51 (diff) |
ofctl_nicira_ext: Resolve not initialized values
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 <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ofctl_nicira_ext.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ryu/lib/ofctl_nicira_ext.py b/ryu/lib/ofctl_nicira_ext.py index 3a5c6be1..0cfa3a0f 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)) |