projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dedc64
)
params: Prevent people from setting attributes on vector params.
author
Nathan Binkert
<nate@binkert.org>
Mon, 16 Jun 2008 04:26:33 +0000
(21:26 -0700)
committer
Nathan Binkert
<nate@binkert.org>
Mon, 16 Jun 2008 04:26:33 +0000
(21:26 -0700)
src/python/m5/params.py
patch
|
blob
|
history
diff --git
a/src/python/m5/params.py
b/src/python/m5/params.py
index 938278541d0b462899b46b20d39db76e6fb3403b..9394b11e2ba92402bfb48d055bb18812637323e8 100644
(file)
--- a/
src/python/m5/params.py
+++ b/
src/python/m5/params.py
@@
-166,6
+166,10
@@
class ParamDesc(object):
class VectorParamValue(list):
__metaclass__ = MetaParamValue
+ def __setattr__(self, attr, value):
+ raise AttributeError, \
+ "Not allowed to set %s on '%s'" % (attr, type(self).__name__)
+
def ini_str(self):
return ' '.join([v.ini_str() for v in self])