summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-06-15 21:26:33 -0700
committerNathan Binkert <nate@binkert.org>2008-06-15 21:26:33 -0700
commitb429b1759defba2f8da1f894f6a3500e3f2c78d2 (patch)
treecea38a47726cf6af992d5e057f550ef131c040d2 /src/python
parent6dedc645f7f54df021e0aa9a5b48015f984a2e39 (diff)
downloadgem5-b429b1759defba2f8da1f894f6a3500e3f2c78d2.tar.xz
params: Prevent people from setting attributes on vector params.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/params.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/python/m5/params.py b/src/python/m5/params.py
index 938278541..9394b11e2 100644
--- 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])