params: Prevent people from setting attributes on vector params.
authorNathan Binkert <nate@binkert.org>
Mon, 16 Jun 2008 04:26:33 +0000 (21:26 -0700)
committerNathan Binkert <nate@binkert.org>
Mon, 16 Jun 2008 04:26:33 +0000 (21:26 -0700)
src/python/m5/params.py

index 938278541d0b462899b46b20d39db76e6fb3403b..9394b11e2ba92402bfb48d055bb18812637323e8 100644 (file)
@@ -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])