Skip to content

Commit

Permalink
add check attr in request; remove aiohttp_session module;
Browse files Browse the repository at this point in the history
  • Loading branch information
iamraa committed Oct 26, 2016
1 parent 5237eb7 commit b65ed78
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions aiohttp_debugtoolbar/panels/request_vars.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import asyncio
from aiohttp_session import get_session
from pprint import saferepr

from .base import DebugPanel
Expand Down Expand Up @@ -37,8 +36,9 @@ def process_response(self, response):
# TODO: think about aiohttp_security

# session to separate table
session = yield from get_session(request)
if not session.empty:
data.update({
'session': [(k, session[k]) for k in session],
})
if hasattr(request, 'session'):
session = request.session
if not session.empty:
data.update({
'session': [(k, session[k]) for k in session],
})

0 comments on commit b65ed78

Please sign in to comment.