Module: check_mk
Branch: master
Commit: cfa44fed87ef20ac0f1c3afc519e1df59cf78ab3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cfa44fed87ef20…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jun 6 15:26:11 2016 +0200
Added current sys.path to cmk crash reports
---
modules/check_mk_base.py | 1 +
web/htdocs/crash_reporting.py | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index f64246f..f2d9189 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -1600,6 +1600,7 @@ def create_crash_dump_info_file(crash_dir, hostname, check_type,
item, params, d
"os" : get_os_info(),
"version" : check_mk_version,
"python_version": sys.version,
+ "python_paths" : sys.path,
"exc_type" : exc_type.__name__,
"exc_value" : "%s" % exc_value,
"exc_traceback" : traceback.extract_tb(exc_traceback),
diff --git a/web/htdocs/crash_reporting.py b/web/htdocs/crash_reporting.py
index 664794e..9b2b29c 100644
--- a/web/htdocs/crash_reporting.py
+++ b/web/htdocs/crash_reporting.py
@@ -281,6 +281,9 @@ def show_crash_report(info):
html.write("<td><pre>%s</pre></td></tr>" %
html.attrencode(format_traceback(info["exc_traceback"])))
html.write("<tr class=\"data odd0\"><td
class=\"left\">%s</td>" % _("Local Variables"))
html.write("<td><pre>%s</pre></td></tr>" %
html.attrencode(format_local_vars(info["local_vars"])))
+ html.write("<tr class=\"data even0\"><td
class=\"left\">%s</td>" % _("Python Module Paths"))
+ joined_paths = "<br>".join([ html.attrencode(p) for p in
info.get("python_paths", [_("Unknown")]) ])
+ html.write("<td>%s</td></tr>" % joined_paths)
html.write("</table>")
@@ -445,6 +448,7 @@ def create_crash_dump_info_file(tar):
"os" : get_os_info(),
"version" : defaults.check_mk_version,
"python_version": sys.version,
+ "python_paths" : sys.path,
"exc_type" : exc_type.__name__,
"exc_value" : "%s" % exc_value,
"exc_traceback" : traceback.extract_tb(exc_traceback),