diff options
author | Nathan Binkert <nate@binkert.org> | 2008-06-15 21:26:33 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-06-15 21:26:33 -0700 |
commit | b429b1759defba2f8da1f894f6a3500e3f2c78d2 (patch) | |
tree | cea38a47726cf6af992d5e057f550ef131c040d2 /src/python/m5 | |
parent | 6dedc645f7f54df021e0aa9a5b48015f984a2e39 (diff) | |
download | gem5-b429b1759defba2f8da1f894f6a3500e3f2c78d2.tar.xz |
params: Prevent people from setting attributes on vector params.
Diffstat (limited to 'src/python/m5')
-rw-r--r-- | src/python/m5/params.py | 4 |
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]) |