1.1 --- a/micropython/report.py Fri Aug 20 01:43:51 2010 +0200
1.2 +++ b/micropython/report.py Sat Aug 21 02:45:58 2010 +0200
1.3 @@ -251,7 +251,7 @@
1.4
1.5 def _assname(self, name, node):
1.6 self._span_start("assname")
1.7 - if hasattr(node, "_attrnames") and node._attrnames[name]:
1.8 + if hasattr(node, "_attrnames") and node._attrnames.get(name):
1.9 attrnames = node._attrnames[name]
1.10 self._name_start()
1.11 self.stream.write(name)
1.12 @@ -370,8 +370,8 @@
1.13
1.14 if attrs:
1.15 for attr in attrs:
1.16 - value = attr.get_value()
1.17 - if value is not None:
1.18 + if attr.is_strict_constant():
1.19 + value = attr.get_value()
1.20 self.stream.write("<td class='summary-class-attr' id='%s'>" % self._attr(value.full_name()))
1.21 self._object_name_ref(self.module, value, classes="summary-ref")
1.22 self.stream.write("</td>\n")
1.23 @@ -534,7 +534,7 @@
1.24 self._name(node.modname)
1.25 self._keyword("import", 1)
1.26 first = 1
1.27 - for (name, alias), _name in map(None, node.names, node._names):
1.28 + for name, alias in node.names:
1.29 if not first:
1.30 self.stream.write(", ")
1.31 if alias:
1.32 @@ -657,7 +657,8 @@
1.33 def visitRaise(self, node):
1.34 self.stream.write("<div class='raise nowrap'>\n")
1.35 self._keyword("raise")
1.36 - self.dispatch(node.expr1)
1.37 + if node.expr1 is not None:
1.38 + self.dispatch(node.expr1)
1.39 if node.expr2 is not None:
1.40 self.stream.write(",\n")
1.41 self.dispatch(node.expr2)