Commit e3b57825 by Tom Christie

Merge pull request #2769 from nonZero/patch-1

Wrong error message on bad field lookup
parents 15a386e8 b95ef25c
...@@ -36,7 +36,7 @@ class ClassLookupDict(object): ...@@ -36,7 +36,7 @@ class ClassLookupDict(object):
for cls in inspect.getmro(base_class): for cls in inspect.getmro(base_class):
if cls in self.mapping: if cls in self.mapping:
return self.mapping[cls] return self.mapping[cls]
raise KeyError('Class %s not found in lookup.', cls.__name__) raise KeyError('Class %s not found in lookup.' % base_class.__name__)
def __setitem__(self, key, value): def __setitem__(self, key, value):
self.mapping[key] = value self.mapping[key] = value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment