rpms/python-beaker/devel python-beaker-py2.4-hashlib.patch, NONE, 1.1

Luke Macken lmacken at fedoraproject.org
Fri Jun 5 13:54:35 UTC 2009


Author: lmacken

Update of /cvs/pkgs/rpms/python-beaker/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28917

Added Files:
	python-beaker-py2.4-hashlib.patch 
Log Message:
Adding the patch usually helps...


python-beaker-py2.4-hashlib.patch:

--- NEW FILE python-beaker-py2.4-hashlib.patch ---
--- beaker/session.py.orig	2009-06-02 08:58:51.000000000 -0400
+++ beaker/session.py	2009-06-02 09:00:26.000000000 -0400
@@ -5,13 +5,8 @@
 import random
 import time
 from datetime import datetime, timedelta
-try:
-    from hashlib import md5, sha1
-except ImportError:
-    from md5 import md5
-    # NOTE: We have to use the callable with hashlib (hashlib.sha1),
-    # otherwise hmac only accepts the sha module object itself
-    import sha as sha1
+from md5 import md5
+import sha as sha1
 
 # Check for pycryptopp encryption for AES
 try:
--- beaker/util.py.orig	2009-06-02 09:22:13.000000000 -0400
+++ beaker/util.py	2009-06-02 09:22:44.000000000 -0400
@@ -17,10 +17,7 @@
     Set = set
 except NameError:
     from sets import Set
-try:
-    from hashlib import sha1
-except ImportError:
-    from sha import sha as sha1
+from sha import sha as sha1
 
 from beaker.converters import asbool
 
--- beaker/crypto/pbkdf2.py.orig	2009-06-02 09:22:07.000000000 -0400
+++ beaker/crypto/pbkdf2.py	2009-06-02 09:22:34.000000000 -0400
@@ -79,12 +79,7 @@
 except ImportError:
     # PyCrypto not available.  Use the Python standard library.
     import hmac as HMAC
-    try:
-        from hashlib import sha1 as SHA1
-    except ImportError:
-        # NOTE: We have to use the callable with hashlib (hashlib.sha1),
-        # otherwise hmac only accepts the sha module object itself
-        import sha as SHA1
+    import sha as SHA1
 
 def strxor(a, b):
     return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a, b)])




More information about the fedora-extras-commits mailing list