util: clean up attrdict and import multiattrdict into m5.util
This commit is contained in:
parent
5fc7adcba0
commit
420402c0a3
2 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue