Commits

Ben Bangert  committed 775a81c

* Fixed error with exception still raised for PyCrypto missing.

  • Participants
  • Parent commits 83441de

Comments (0)

Files changed (4)

 ================
 
 0.9.3 (**tip**)
+* Fixed error with exception still raised for PyCrypto missing.
 * WARNING: Session middleware no longer catches Paste HTTP Exceptions, apps
   are now expected to capture and handle Paste HTTP Exceptions themselves.
 * Fixed Python 2.4 compatibility bug in hmac.

File beaker/ext/memcached.py

         
         verify_directory(self.lock_dir)            
         
-        self.mc = MemcachedNamespaceManager.clients.get(url, lambda: memcache.Client(url.split(';'), debug=0))
+        self.mc = MemcachedNamespaceManager.clients.get(url, 
+            lambda: memcache.Client(url.split(';'), debug=0))
 
     # memcached does its own locking.  override our own stuff
     def do_acquire_read_lock(self): pass

File beaker/session.py

     def __init__(self, request, key='beaker.session.id', timeout=None,
                  cookie_expires=True, cookie_domain=None, encrypt_key=None,
                  validate_key=None, secure=False, **kwargs):
-        if not crypto_ok:
-            raise BeakerException("PyCrypto is not installed, can't use cookie-only Session.")
+        if not crypto_ok and encrypt_key:
+            raise BeakerException("pycryptopp is not installed, can't use "
+                                  "encrypted cookie-only Session.")
         
         self.request = request
         self.key = key

File tests/test_database.py

File contents unchanged.