Wrong error message on bad field lookup

This commit is contained in:
Udi Oron 2015-03-26 20:13:35 +02:00
parent 5f3d09a052
commit b95ef25cbb

View File

@ -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