util: clean up attrdict and import multiattrdict into m5.util

This commit is contained in:
Nathan Binkert 2010-06-14 23:24:46 -07:00
parent 5fc7adcba0
commit 420402c0a3
2 changed files with 4 additions and 1 deletions

View file

@ -34,7 +34,7 @@ import sys
import convert
import jobfile
from attrdict import attrdict, optiondict
from attrdict import attrdict, multiattrdict, optiondict
from code_formatter import code_formatter
from multidict import multidict
from orderdict import orderdict

View file

@ -58,6 +58,9 @@ class multiattrdict(attrdict):
try:
return super(multiattrdict, self).__getattr__(attr)
except AttributeError:
if attr.startswith('_'):
raise
d = multiattrdict()
setattr(self, attr, d)
return d