Module: check_mk
Branch: master
Commit: 3f1c58655c1a8c86332171afbd821a8a308b0e63
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=3f1c58655c1a8c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 10 09:21:01 2016 +0200
Small fix in man page parsing error output
---
lib/man_pages.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/man_pages.py b/lib/man_pages.py
index ad0a5f7..a013983 100644
--- a/lib/man_pages.py
+++ b/lib/man_pages.py
@@ -478,14 +478,14 @@ def load_man_page(name):
if line[0] == '[' and line[-1] == ']':
section_header = line[1:-1]
- current_section = []
+ current_section, current_variable = [], None
man_page[section_header] = current_section
else:
current_variable, restofline = line.split(':', 1)
current_section.append((current_variable, restofline.lstrip()))
except Exception, e:
- raise MKGeneralException("Syntax error in %s line %d (%s).\n" %
(path, lineno, e))
+ raise MKGeneralException("Syntax error in %s line %d (%s).\n" %
(path, lineno+1, e))
header = {}
for key, value in man_page['header']: