Hi Michael,

Interdiff:
diff --git a/lib/bootstrap.py b/lib/bootstrap.py
index 85c2251..ffba587 100644
--- a/lib/bootstrap.py
+++ b/lib/bootstrap.py
@@ -183,7 +183,7 @@ def GenerateClusterCrypto(new_cluster_cert,
new_rapi_cert, new_spice_cert,
     # certificate
     logging.debug("Writing the public certificate to %s",
                   spicecert_file)
-    utils.io.WriteFile(spicecacert_file, mode=0400, data=cert_pem)
+    utils.WriteFile(spicecacert_file, mode=0400, data=cert_pem)

   # Cluster domain secret
   if cds:
diff --git a/lib/client/gnt_cluster.py b/lib/client/gnt_cluster.py
index 5637774..4185d5f 100644
--- a/lib/client/gnt_cluster.py
+++ b/lib/client/gnt_cluster.py
@@ -663,20 +663,20 @@ def _ReadAndVerifyCert(cert_filename,
verify_private_key=False):
     pem = utils.ReadFile(cert_filename)
   except IOError, err:
     raise errors.X509CertError(cert_filename,
-                               "Unable to read certificate: %s" % str(err))
+                               "Unable to read certificate: %s" % err)

   try:
     OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, pem)
   except Exception, err:
     raise errors.X509CertError(cert_filename,
-                               "Unable to load certificate: %s" % str(err))
+                               "Unable to load certificate: %s" % err)

   if verify_private_key:
     try:
       OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, pem)
     except Exception, err:
       raise errors.X509CertError(cert_filename,
-                                 "Unable to load private key: %s" % str(err))
+                                 "Unable to load private key: %s" % err)

   return pem

Reply via email to