Fix i386 test failures
Signed-off-by: Corey Bryant <corey.bryant@canonical.com> Reviewed-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
5552348c7c
commit
27409a544e
@ -170,7 +170,7 @@ class MsgBase(StringifyMixin):
|
||||
|
||||
def __str__(self):
|
||||
def hexify(x):
|
||||
return hex(x) if isinstance(x, int) else x
|
||||
return hex(x) if isinstance(x, six.integer_types) else x
|
||||
buf = 'version=%s,msg_type=%s,msg_len=%s,xid=%s,' %\
|
||||
(hexify(self.version), hexify(self.msg_type),
|
||||
hexify(self.msg_len), hexify(self.xid))
|
||||
|
@ -82,7 +82,7 @@ def _get_field_info_by_number(oxx, num_to_field, n):
|
||||
name = f.name
|
||||
except KeyError:
|
||||
t = type_desc.UnknownType
|
||||
if isinstance(n, int):
|
||||
if isinstance(n, six.integer_types):
|
||||
name = 'field_%d' % (n,)
|
||||
else:
|
||||
raise KeyError('unknown %s field number: %s' % (oxx.upper(), n))
|
||||
|
@ -697,7 +697,7 @@ class TestPacket(unittest.TestCase):
|
||||
sctp_values = {'src_port': 1,
|
||||
'dst_port': 1,
|
||||
'vtag': 0,
|
||||
'csum': p_sctp.csum,
|
||||
'csum': repr(p_sctp.csum),
|
||||
'chunks': data_str}
|
||||
_sctp_str = ','.join(['%s=%s' % (k, sctp_values[k])
|
||||
for k, _ in inspect.getmembers(p_sctp)
|
||||
@ -1233,7 +1233,7 @@ class TestPacket(unittest.TestCase):
|
||||
sctp_values = {'src_port': 1,
|
||||
'dst_port': 1,
|
||||
'vtag': 0,
|
||||
'csum': p_sctp.csum,
|
||||
'csum': repr(p_sctp.csum),
|
||||
'chunks': data_str}
|
||||
_sctp_str = ','.join(['%s=%s' % (k, sctp_values[k])
|
||||
for k, _ in inspect.getmembers(p_sctp)
|
||||
|
Loading…
Reference in New Issue
Block a user