Module: check_mk
Branch: master
Commit: 131409c2c42213a278fc1e5b82fb8cd6491b7d7d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=131409c2c42213…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 20 11:48:13 2018 +0200
6627 FIX Fixed exception in export hook software_csv
The exception "global name 'cmk' is not defined" occurred when trying
to
use the software export hook in 1.5.
Change-Id: I7aa327df24f2101ae612cbb7188448be2430b9f1
---
.werks/6627 | 12 ++++++++++++
inventory/export_software_csv | 2 ++
2 files changed, 14 insertions(+)
diff --git a/.werks/6627 b/.werks/6627
new file mode 100644
index 0000000..97b33ab
--- /dev/null
+++ b/.werks/6627
@@ -0,0 +1,12 @@
+Title: Fixed exception in export hook software_csv
+Level: 1
+Component: inv
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1537436791
+
+The exception "global name 'cmk' is not defined" occurred when trying
to
+use the software export hook in 1.5.
diff --git a/inventory/export_software_csv b/inventory/export_software_csv
index 068866f..83a9eea 100644
--- a/inventory/export_software_csv
+++ b/inventory/export_software_csv
@@ -24,6 +24,8 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
+import cmk.paths
+
def inv_export_software_csv(hostname, params, tree):
separator = params.get("separator", ";")
quotes = params.get("quotes", None) # Also: "single",
"double"