diff options
Diffstat (limited to 'src/python/m5/multidict.py')
-rw-r--r-- | src/python/m5/multidict.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/python/m5/multidict.py b/src/python/m5/multidict.py index 34fc3139b..b5cd700ef 100644 --- a/src/python/m5/multidict.py +++ b/src/python/m5/multidict.py @@ -29,7 +29,6 @@ __all__ = [ 'multidict' ] class multidict(object): - __nodefault = object() def __init__(self, parent = {}, **kwargs): self.local = dict(**kwargs) self.parent = parent @@ -102,14 +101,11 @@ class multidict(object): def values(self): return [ value for key,value in self.next() ] - def get(self, key, default=__nodefault): + def get(self, key, default=None): try: return self[key] except KeyError, e: - if default != self.__nodefault: - return default - else: - raise KeyError, e + return default def setdefault(self, key, default): try: |