config: Fix ommission of number base in ethernet address param

The ethernet address param tries to convert a hexadecimal
string using int() in python, which defaults to base 10,
need to specify base 16 in this case.
This commit is contained in:
Geoffrey Blake 2013-10-17 10:20:45 -05:00
parent 3d582c767a
commit 2b9138135e

View file

@ -697,7 +697,7 @@ class EthernetAddr(ParamValue):
raise TypeError, 'invalid ethernet address %s' % value
for byte in bytes:
if not 0 <= int(byte) <= 0xff:
if not 0 <= int(byte, base=16) <= 0xff:
raise TypeError, 'invalid ethernet address %s' % value
self.value = value