Commits

Ben Bangert committed d3a2838

Moved imports for crypto into a try block.

Comments (0)

Files changed (1)

beaker/session.py

     if Crypto.__version__ >= '2.0.1':
         crypto_ok = True
         strong_hash = SHA.new
+    from beaker.crypto import generateCryptoKeys
+    from beaker.crypto.CTRCipher import CTRCipher
+    from beaker.crypto.PBKDF2 import strxor
 except:
     pass
 
     except:
         pass
 
-from beaker.crypto import generateCryptoKeys
-from beaker.crypto.CTRCipher import CTRCipher
-from beaker.crypto.PBKDF2 import strxor
 from beaker.container import namespace_registry
 from beaker.exceptions import BeakerException
 from beaker.util import coerce_session_params