Skip to content

Commit

Permalink
Fix ./examples/web_cookies.py to avoid a warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jan 26, 2020
1 parent 72176b2 commit 382d7b2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/web_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ async def root(request):


async def login(request):
resp = web.HTTPFound(location='/')
resp.set_cookie('AUTH', 'secret')
return resp
exc = web.HTTPFound(location='/')
exc.set_cookie('AUTH', 'secret')
raise exc


async def logout(request):
resp = web.HTTPFound(location='/')
resp.del_cookie('AUTH')
return resp
exc = web.HTTPFound(location='/')
exc.del_cookie('AUTH')
raise exc


def init():
Expand Down

0 comments on commit 382d7b2

Please sign in to comment.