Use format to convert ints to strings

This ensures that on 32bit architectures, where
sometimes an implicit long is created, the resulting
string does not contain a 'L' suffix as generated
by the hex function.

Change-Id: I264f90d68009963fe7a217c2170e1cf2f46ae2bb
Closes-Bug: 1501703
This commit is contained in:
James Page 2015-10-01 11:54:28 +01:00
parent 9ccefdac56
commit 49883f1b2b
1 changed files with 1 additions and 1 deletions

View File

@ -331,7 +331,7 @@ class IpRuleCommand(IpCommandBase):
integers.append(0xffffffff)
# We now have two integers in a list. Convert to canonical string.
return '/'.join(map(hex, integers))
return '{0:#x}/{1:#x}'.format(*integers)
def canonicalize(item):
k, v = item