From: Nathan Binkert Date: Mon, 16 Jun 2008 04:26:33 +0000 (-0700) Subject: params: Prevent people from setting attributes on vector params. X-Git-Tag: m5_2.0_beta6~109 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b429b1759defba2f8da1f894f6a3500e3f2c78d2;p=gem5.git params: Prevent people from setting attributes on vector params. --- 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])