1.1 --- a/micropython/report.py Sun Oct 13 18:40:30 2013 +0200
1.2 +++ b/micropython/report.py Sun Oct 13 19:23:39 2013 +0200
1.3 @@ -429,14 +429,17 @@
1.4 return values
1.5
1.6 def _attribute_value_to_name(self, attr, value, target=False):
1.7 - if value and not isinstance(value, Instance):
1.8 - fullname = value.full_name()
1.9 - elif value and isinstance(value, Const):
1.10 + if value and not isinstance(value, Instance) and (not target or value.parent):
1.11 + fullname = target and value.parent and value.parent.full_name() or value.full_name()
1.12 + elif value and isinstance(value, Const) and not target:
1.13 fullname = "%s" % value.get_value()
1.14 - elif isinstance(attr.parent, Instance):
1.15 - fullname = "%s%s" % (attr.parent_type.full_name(), not target and ".%s" % attr.name or "")
1.16 + elif attr:
1.17 + if isinstance(attr.parent, Instance):
1.18 + fullname = "%s%s" % (attr.parent_type.full_name(), not target and ".%s" % attr.name or "")
1.19 + else:
1.20 + fullname = "%s%s" % (attr.parent.full_name(), not target and ".%s" % attr.name or "")
1.21 else:
1.22 - fullname = "%s%s" % (attr.parent.full_name(), not target and ".%s" % attr.name or "")
1.23 + fullname = None
1.24 return fullname
1.25
1.26 def _attributes_to_target_names(self, attributes):
1.27 @@ -448,7 +451,8 @@
1.28 if attributes:
1.29 for attr, value in attributes:
1.30 fullname = self._attribute_value_to_name(attr, value, True)
1.31 - output.append(fullname)
1.32 + if fullname:
1.33 + output.append(fullname)
1.34
1.35 output.sort()
1.36 return output