[Zodb-checkins] SVN: ZODB/trunk/src/ZEO/hash.py using try.except
Andreas Jung
andreas at andreas-jung.com
Wed Apr 15 03:38:06 EDT 2009
Log message for revision 99186:
using try.except
Changed:
U ZODB/trunk/src/ZEO/hash.py
-=-
Modified: ZODB/trunk/src/ZEO/hash.py
===================================================================
--- ZODB/trunk/src/ZEO/hash.py 2009-04-15 05:38:56 UTC (rev 99185)
+++ ZODB/trunk/src/ZEO/hash.py 2009-04-15 07:38:06 UTC (rev 99186)
@@ -18,11 +18,11 @@
import sys
-if sys.version_info[:2] >= (2, 6):
+try:
import hashlib
sha1 = hashlib.sha1
new = sha1
-else:
+except ImportError:
import sha
sha1 = sha.new
new = sha1
More information about the Zodb-checkins
mailing list