Module: check_mk
Branch: master
Commit: 92072e649f5633db094d1ff5f107f6e37b129e3f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=92072e649f5633…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Dec 11 11:44:29 2018 +0100
Make open_table() exception-safe.
Change-Id: Ib1030907fe9bdfbf9bbc4aa071467f010b27dcdf
---
cmk/gui/table.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmk/gui/table.py b/cmk/gui/table.py
index aa52940..14bdcd5 100644
--- a/cmk/gui/table.py
+++ b/cmk/gui/table.py
@@ -40,8 +40,10 @@ tables = []
@contextmanager
def open_table(table_id=None, title=None, **kwargs):
begin(table_id, title, **kwargs)
- yield
- end()
+ try:
+ yield
+ finally:
+ end()
def begin(table_id=None, title=None, **kwargs):