Skip to content

Commit

Permalink
More fixes for NNNL reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Jan 20, 2017
1 parent f53d69c commit 78d3a79
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
7 changes: 5 additions & 2 deletions py/test/test_nl.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,11 @@ def test_nnnl(self):
'nesting_tree',
'&', ]
# make sure no errors are raised in reporting
m.xhtml(*cats)
m.xhtml('*')
import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore')
m.xhtml(*cats)
m.xhtml('*')


def test_nnnl_quant(self):
Expand Down
8 changes: 7 additions & 1 deletion py/util/xhtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ def append(self, arg):
if isinstance(arg, XML_Builder):
super().append(arg.close())
else:
super().append(arg)
try:
super().append(arg)
except TypeError:
if callable(arg):
super().append(arg())
else:
raise
def __lshift__(self,other):
if other is not None:
self.append(other)
Expand Down

0 comments on commit 78d3a79

Please sign in to comment.