python: Eliminate the Python use of eval() and frame manipulation

--HG--
extra : convert_revision : 04520bcfab510580a1c7fb341afbd2487287d1ab
This commit is contained in:
Miles Kaufmann
2007-08-30 15:16:58 -04:00
parent f67cd04673
commit 9cb49ab9e0
2 changed files with 23 additions and 22 deletions

View File

@@ -757,7 +757,7 @@ class SimObject(object):
if self._ccParams:
return self._ccParams
cc_params_struct = eval('m5.objects.params.%sParams' % self.type)
cc_params_struct = getattr(m5.objects.params, '%sParams' % self.type)
cc_params = cc_params_struct()
cc_params.object = self
cc_params.name = str(self)