[checkmk-commits] Check_MK Git: check_mk: agent_netapp: let --debug make Python exception come through

Mathias Kettner mk at mathias-kettner.de
Tue Apr 7 18:03:02 CEST 2015


Module: check_mk
Branch: master
Commit: 5bb2d0db6b637551a9718d321f24af0fc3848b61
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5bb2d0db6b637551a9718d321f24af0fc3848b61

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Tue Apr  7 18:03:00 2015 +0200

agent_netapp: let --debug make Python exception come through

---

 agents/special/agent_netapp |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/agents/special/agent_netapp b/agents/special/agent_netapp
index 64fb6a3..a1b4cae 100755
--- a/agents/special/agent_netapp
+++ b/agents/special/agent_netapp
@@ -31,9 +31,9 @@ try:
     from NaElement import *
     from NaServer import *
 except Exception, e:
-    sys.stderr.write("Unable to import the files NaServer.py/NaElement.py. These files are "\
+    sys.stderr.write("Unable to import the files NaServer.py/NaElement.py.\nThese files are "\
                      "provided by the NetApp Managability SDK and must be put into "\
-                     "the sites folder ~/local/lib/python.\nDetailed error: %s" % e)
+                     "the sites folder ~/local/lib/python.\nDetailed error: %s\n" % e)
     sys.exit(1)
 
 
@@ -406,7 +406,8 @@ try:
         raise Exception("\n".join(errors))
 
 except Exception, e:
+    if opt_debug:
+        raise
     sys.stderr.write("Error(s) on processing the received data:\n%s" % e)
     sys.exit(1)
 
-



More information about the checkmk-commits mailing list