Avoid string exception raising
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
fe86b9527e
commit
0e4fec9f1f
@ -97,7 +97,7 @@ class RunTest(tester.TestFlowBase):
|
|||||||
elif type_ == 'ipv6':
|
elif type_ == 'ipv6':
|
||||||
v = self.ipv6_masked(value, mask)
|
v = self.ipv6_masked(value, mask)
|
||||||
else:
|
else:
|
||||||
raise 'Unknown type'
|
raise Exception('Unknown type')
|
||||||
return v
|
return v
|
||||||
|
|
||||||
def _is_all_zero_bit(self, type_, val):
|
def _is_all_zero_bit(self, type_, val):
|
||||||
@ -114,7 +114,7 @@ class RunTest(tester.TestFlowBase):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
raise 'Unknown type'
|
raise Exception('Unknown type')
|
||||||
|
|
||||||
def _cnv_to_str(self, type_, value, mask, f_value, f_mask):
|
def _cnv_to_str(self, type_, value, mask, f_value, f_mask):
|
||||||
func = None
|
func = None
|
||||||
@ -127,7 +127,7 @@ class RunTest(tester.TestFlowBase):
|
|||||||
elif type_ == 'ipv6':
|
elif type_ == 'ipv6':
|
||||||
func = self.ipv6_to_str
|
func = self.ipv6_to_str
|
||||||
else:
|
else:
|
||||||
raise 'Unknown type'
|
raise Exception('Unknown type')
|
||||||
|
|
||||||
if func:
|
if func:
|
||||||
value = func(value)
|
value = func(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user