From 0e4fec9f1f86cc2e61f7ae9f4c2597b945eaeec4 Mon Sep 17 00:00:00 2001 From: Yusuke Iwase Date: Tue, 30 Jun 2015 16:46:29 +0900 Subject: [PATCH] Avoid string exception raising Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- ryu/tests/integrated/test_add_flow_v12_matches.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryu/tests/integrated/test_add_flow_v12_matches.py b/ryu/tests/integrated/test_add_flow_v12_matches.py index 276548bb..588855a6 100644 --- a/ryu/tests/integrated/test_add_flow_v12_matches.py +++ b/ryu/tests/integrated/test_add_flow_v12_matches.py @@ -97,7 +97,7 @@ class RunTest(tester.TestFlowBase): elif type_ == 'ipv6': v = self.ipv6_masked(value, mask) else: - raise 'Unknown type' + raise Exception('Unknown type') return v def _is_all_zero_bit(self, type_, val): @@ -114,7 +114,7 @@ class RunTest(tester.TestFlowBase): return False return True else: - raise 'Unknown type' + raise Exception('Unknown type') def _cnv_to_str(self, type_, value, mask, f_value, f_mask): func = None @@ -127,7 +127,7 @@ class RunTest(tester.TestFlowBase): elif type_ == 'ipv6': func = self.ipv6_to_str else: - raise 'Unknown type' + raise Exception('Unknown type') if func: value = func(value)