Module: check_mk
Branch: master
Commit: ee90eaa66c0a6eed68e457c5e927d8090cb4140e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=ee90eaa66c0a6e…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Thu Oct 30 09:48:45 2014 +0100
fixed exception when table.end was called without table.begin
---
web/htdocs/table.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web/htdocs/table.py b/web/htdocs/table.py
index f5af97a..53e7fe1 100644
--- a/web/htdocs/table.py
+++ b/web/htdocs/table.py
@@ -122,14 +122,14 @@ def end():
finish_previous()
html.unplug()
+ if not table:
+ return
+
# Output-Format "fetch" simply means that all data is being
# returned as Python-values to be rendered somewhere else.
if table["output_format"] == "fetch":
return table["headers"], table["rows"]
- if not table:
- return
-
if table["output_format"] == "csv":
do_csv = True
csv_separator = html.var("csv_separator", ";")