projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3d582c7
)
config: Fix ommission of number base in ethernet address param
author
Geoffrey Blake
<Geoffrey.Blake@arm.com>
Thu, 17 Oct 2013 15:20:45 +0000
(10:20 -0500)
committer
Geoffrey Blake
<Geoffrey.Blake@arm.com>
Thu, 17 Oct 2013 15:20:45 +0000
(10:20 -0500)
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.
src/python/m5/params.py
patch
|
blob
|
history
diff --git
a/src/python/m5/params.py
b/src/python/m5/params.py
index 1e8c24584b4a00ed4df624a13029f5ebb7067def..981bb0d37a9486a647546f705c833dea1f9af495 100644
(file)
--- 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