Permalink
Browse files

tidying up the additional update-cookie stuff from bootandy

  • Loading branch information...
1 parent 0b9ad13 commit 77cc919885436296fa5e2c42d7b075b60cfa18e2 @peterbe committed Jun 15, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 tornado_utils/http_test_client.py
@@ -74,11 +74,12 @@ def _update_cookies(self, headers):
try:
sc = headers['Set-Cookie']
cookies = escape.native_str(sc)
+ self.cookies.update(Cookie.SimpleCookie(cookies))
while True:
self.cookies.update(Cookie.SimpleCookie(cookies))
- if cookies.find(',') == -1:
+ if ',' not in cookies:
break
- cookies = cookies[cookies.find(',') + len(','):]
+ cookies = cookies[cookies.find(',') + 1:]
except KeyError:
return

0 comments on commit 77cc919

Please sign in to comment.