Skip to content

Commit b0d5c5d

Browse files
gberaudoamol-
authored andcommitted
Fix session creation without encryption (no aes) (#156)
In the absence of AES support by the cryptographic module, an exception was thrown at session creation time.
1 parent 300b736 commit b0d5c5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: beaker/session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def __init__(self, request, key='beaker.session.id', timeout=None,
567567

568568
self.crypto_module = get_crypto_module(crypto_type)
569569

570-
if not self.crypto_module.has_aes and encrypt_key:
570+
if encrypt_key and not self.crypto_module.has_aes:
571571
raise InvalidCryptoBackendError("No AES library is installed, can't generate "
572572
"encrypted cookie-only Session.")
573573

0 commit comments

Comments
 (0)