diff --git a/pyramid_beaker/__init__.py b/pyramid_beaker/__init__.py index 166e84a..3a4b2d3 100644 --- a/pyramid_beaker/__init__.py +++ b/pyramid_beaker/__init__.py @@ -25,8 +25,8 @@ def __init__(self, request): SessionObject.__init__(self, request.environ, **self._options) def session_callback(request, response): exception = getattr(request, 'exception', None) - if (exception is None or self._cookie_on_exception - and self.accessed()): + if (exception is None or self._cookie_on_exception) \ + and self.accessed(): self.persist() headers = self.__dict__['_headers'] if headers['set_cookie'] and headers['cookie_out']: