2016-12-06 | Paul Boddie | raw files shortlog changelog graph | Prevent exceptions where classes are investigated as providers of attributes. | |
importer.py (file) |
1.1 --- a/importer.py Mon Dec 05 18:30:55 2016 +0100 1.2 +++ b/importer.py Tue Dec 06 01:08:48 2016 +0100 1.3 @@ -214,7 +214,8 @@ 1.4 1.5 "Return from 'object_type' the details of class attribute 'attrname'." 1.6 1.7 - attr = self.all_class_attrs[object_type].get(attrname) 1.8 + attrs = self.all_class_attrs.get(object_type) 1.9 + attr = attrs and attrs.get(attrname) 1.10 return attr and self.get_object(attr) 1.11 1.12 def get_instance_attributes(self, object_type, attrname):