From: Geoffrey Blake Date: Thu, 17 Oct 2013 15:20:45 +0000 (-0500) Subject: config: Fix ommission of number base in ethernet address param X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b9138135ee5c751136bb53738a44211557961f9;p=gem5.git 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. --- diff --git a/src/python/m5/params.py b/src/python/m5/params.py index 1e8c24584..981bb0d37 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -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