cubicweb/pyramid/session.py
changeset 11993 07af2c2c264b
parent 11967 83739be20fab
child 12108 1a5fc93c81db
--- a/cubicweb/pyramid/session.py	Mon Feb 27 09:06:23 2017 +0100
+++ b/cubicweb/pyramid/session.py	Mon Feb 27 14:49:32 2017 +0100
@@ -187,15 +187,9 @@
     See also :ref:`defaults_module`
     """
     settings = config.registry.settings
-    secret = settings.get('cubicweb.session.secret', '')
-    if not secret:
-        secret = config.registry['cubicweb.config'].get('pyramid-session-secret')
-        warnings.warn('''
-        Please migrate pyramid-session-secret from
-        all-in-one.conf to cubicweb.session.secret config entry in
-        your pyramid.ini file.
-        ''')
-    if not secret:
+    try:
+        secret = settings['cubicweb.session.secret']
+    except KeyError:
         secret = 'notsosecret'
         warnings.warn('''