[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/tests/auth_plaintext.py using hashlib.sha1 if available in order to avoid DeprecationWarning

Andreas Jung andreas at andreas-jung.com
Mon Mar 30 16:19:22 EDT 2009


Log message for revision 98624:
  using hashlib.sha1 if available in order to avoid DeprecationWarning
  under Python 2.6
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/auth_plaintext.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/auth_plaintext.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/auth_plaintext.py	2009-03-30 20:17:22 UTC (rev 98623)
+++ ZODB/trunk/src/ZEO/tests/auth_plaintext.py	2009-03-30 20:19:22 UTC (rev 98624)
@@ -19,7 +19,10 @@
 is provided by not storing plaintext passwords on disk.
 """
 
-import sha
+try
+    from hashlib import sha1 as sha
+except ImportError:
+    import sha
 
 from ZEO.StorageServer import ZEOStorage
 from ZEO.auth import register_module



More information about the Zodb-checkins mailing list