Bläddra i källkod

AMBARI-10124. Wrong alert on added host on secure cluster (rlevas)

Robert Levas 10 år sedan
förälder
incheckning
32e1215639
1 ändrade filer med 3 tillägg och 3 borttagningar
  1. 3 3
      ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py

+ 3 - 3
ambari-agent/src/main/python/ambari_agent/alerts/web_alert.py

@@ -140,8 +140,8 @@ class WebAlert(BaseAlert):
     """
     Makes an http(s) request to a web resource and returns the http code. If
     there was an error making the request, return 0 for the status code.
-    """    
-
+    """
+    error_msg = None
     try:
       response_code = 0
       kerberos_keytab = None
@@ -210,7 +210,7 @@ class WebAlert(BaseAlert):
 
         # empty quotes evaluates to false
         if curl_stderr:
-          raise Exception(curl_stderr)
+          error_msg = curl_stderr
 
         # empty quotes evaluates to false
         if curl_stdout: