From 6ed59e39fea635032530d721c54ed793890ff05f Mon Sep 17 00:00:00 2001 From: giomba Date: Sun, 21 Oct 2018 13:21:18 +0200 Subject: [PATCH] Added message for empty resultsets --- tcparser.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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