CVS: tmda/TMDA Auth.py,1.14,1.15

Gre7g Luterman <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda/TMDA
In directory sc8-pr-cvs1:/tmp/cvs-serv19017a

Modified Files:
	Auth.py 
Log Message:
Reverted back to previous Python 2.2 dependency.


Index: Auth.py
===================================================================
RCS file: /cvsroot/tmda/tmda/TMDA/Auth.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Auth.py	14 May 2003 06:00:22 -0000	1.14
+++ Auth.py	14 May 2003 17:37:54 -0000	1.15
@@ -26,12 +26,12 @@
 import sys
 import socket
 import base64
+import hmac
 import md5
 import popen2
 import time
 
 # TMDA imports
-import HMAC
 import Version
 import Util
 import Errors
@@ -130,6 +130,13 @@
         elif configdir is not None:
             self.setup_configdir( configdir )
 
+        # check whether we are running a recent enough Python
+        if not Version.PYTHON >= '2.2':
+            msg = 'Python 2.2 or greater is required to run ' + 
+                  self.__program + \
+                  ' -- Visit http://python.org/download/ to upgrade.'
+            self.warning(msg)
+
     def warning(self, msg='', exit=1):
         delimiter = '*' * 70
         if msg:
@@ -358,7 +365,7 @@
         password = self.__authdict.get(username.lower(), 0)
         if password == 0:
             return 0
-        newhexdigest = HMAC.HMAC(password, ticket, digestmod).hexdigest()
+        newhexdigest = hmac.HMAC(password, ticket, digestmod).hexdigest()
         return newhexdigest == hexdigest
 
     def supports_cram_md5(self):

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.