summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
authorAndrew Bardsley <Andrew.Bardsley@arm.com>2015-11-22 05:10:21 -0500
committerAndrew Bardsley <Andrew.Bardsley@arm.com>2015-11-22 05:10:21 -0500
commit4375678a0d8429ee51882d328f851402b61d6ac5 (patch)
treecbe5b044d9c13dfd27b59edf6778c0b97ba73e33 /src/python/m5
parent4596a33e10ebbab83d757c5c6a9efe9c299a7499 (diff)
downloadgem5-4375678a0d8429ee51882d328f851402b61d6ac5.tar.xz
config: Added missing types to JSON/INI Python reader
Added the missing types EthernetAddr and Current to the JSON/INI file reader example configs/example/read_config.py. Also added __str__ to EthernetAddr to make values appear in the same form in JSON an INI files.
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/params.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 846c5416e..f1eead80d 100644
--- a/src/python/m5/params.py
+++ b/src/python/m5/params.py
@@ -930,6 +930,9 @@ class EthernetAddr(ParamValue):
from m5.internal.params import EthAddr
return EthAddr(self.value)
+ def __str__(self):
+ return self.value
+
def ini_str(self):
return self.value