# HG changeset patch # User Denis Laxalde # Date 1488203372 -3600 # Node ID 07af2c2c264b632f8a48aa762981f7e78f54d740 # Parent fa1837a8570885bd2b66fab85ae0b0172f9dcb48 [pyramid] Drop retrieval of auth/session secret in all-in-one.conf We actually never supported this in cubicweb, but only in pyramid-cubicweb. diff -r fa1837a85708 -r 07af2c2c264b cubicweb/pyramid/auth.py --- a/cubicweb/pyramid/auth.py Mon Feb 27 09:06:23 2017 +0100 +++ b/cubicweb/pyramid/auth.py Mon Feb 27 14:49:32 2017 +0100 @@ -128,20 +128,10 @@ session_prefix = 'cubicweb.auth.authtkt.session.' persistent_prefix = 'cubicweb.auth.authtkt.persistent.' - try: - secret = config.registry['cubicweb.config']['pyramid-auth-secret'] - warnings.warn( - "pyramid-auth-secret from all-in-one is now " - "cubicweb.auth.authtkt.[session|persistent].secret", - DeprecationWarning) - except: - secret = 'notsosecret' - session_secret = settings.get( - session_prefix + 'secret', secret) + session_prefix + 'secret', 'notsosecret') persistent_secret = settings.get( - persistent_prefix + 'secret', secret) - + persistent_prefix + 'secret', 'notsosecret') if 'notsosecret' in (session_secret, persistent_secret): warnings.warn(''' diff -r fa1837a85708 -r 07af2c2c264b cubicweb/pyramid/session.py --- 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('''