watcher: Make RAPI error messages less technical
authorMichael Hanselmann <hansmi@google.com>
Fri, 29 Jul 2011 13:49:55 +0000 (15:49 +0200)
committerMichael Hanselmann <hansmi@google.com>
Fri, 29 Jul 2011 15:02:04 +0000 (17:02 +0200)
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/watcher/__init__.py

index 23047df..1dee4f3 100644 (file)
@@ -401,13 +401,14 @@ def IsRapiResponding(hostname):
   try:
     master_version = rapi_client.GetVersion()
   except rapi.client.CertificateError, err:
-    logging.warning("RAPI Error: CertificateError (%s)", err)
+    logging.warning("RAPI certificate error: %s", err)
     return False
   except rapi.client.GanetiApiError, err:
-    logging.warning("RAPI Error: GanetiApiError (%s)", err)
+    logging.warning("RAPI error: %s", err)
     return False
-  logging.debug("RAPI Result: master_version is %s", master_version)
-  return master_version == constants.RAPI_VERSION
+  else:
+    logging.debug("Reported RAPI version %s", master_version)
+    return master_version == constants.RAPI_VERSION
 
 
 def ParseOptions():