renamed files used at runtime (see post-install script in specfile)
[nodemanager.git] / plcapi.py
index 4e6daaa..ca411df 100644 (file)
--- a/plcapi.py
+++ b/plcapi.py
@@ -2,7 +2,11 @@
 # $URL$
 
 import safexmlrpc
-import hmac, sha
+import hmac
+try:
+    from hashlib import sha1 as sha
+except ImportError:
+    import sha
 import logger
 
 class PLCAPI:
@@ -16,7 +20,7 @@ class PLCAPI:
     session => SessionAuth
 
     To authenticate using the Boot Manager authentication method, or
-    the new session-based method.
+    the new session-based method, respectively.
     """
 
     def __init__(self, uri, cacert, auth, timeout = 90, **kwds):
@@ -56,7 +60,7 @@ class PLCAPI:
             try: 
                 authstatus = self.AuthCheck()
             except: 
-                logger.log_exc("failed in plcapi.check_authentication")
+                logger.log_exc("plcapi: failed in plcapi.check_authentication")
         return authstatus