diff --git a/tcparser.py b/tcparser.py index 4660f21..c55af88 100644 --- a/tcparser.py +++ b/tcparser.py @@ -74,6 +74,14 @@ def getHTML(library): html.append(body) body.append(main) main.append(h1) + + # Check for empty resultset + if len(library) == 0: + p = ET.Element('p') + p.text = "No items" + main.append(p) + return tree + main.append(table) # Build a beautiful table header