use hashlib and fallback to sha (for python 2.4)
[nodemanager.git] / plcapi.py
index a2d31cb..6ed3cac 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: