From b429b1759defba2f8da1f894f6a3500e3f2c78d2 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Sun, 15 Jun 2008 21:26:33 -0700 Subject: params: Prevent people from setting attributes on vector params. --- src/python/m5/params.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/python') 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]) -- cgit v1.2.3