From 631c54b7118b5976695f7246156ed7e45e046694 Mon Sep 17 00:00:00 2001 From: asavchyn Date: Wed, 20 Mar 2013 11:45:56 +0200 Subject: [PATCH] Fixed PyPy cookie updating issue --- httpie/sessions.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/httpie/sessions.py b/httpie/sessions.py index 19aa8e53..b567175e 100644 --- a/httpie/sessions.py +++ b/httpie/sessions.py @@ -152,10 +152,8 @@ class Session(BaseConfigDict): # http://docs.python.org/2/library/cookielib.html#cookie-objects stored_attrs = ['value', 'path', 'secure', 'expires'] self['cookies'] = {} - for host in jar._cookies.values(): - for path in host.values(): - for name, cookie in path.items(): - self['cookies'][name] = dict( + for cookie in jar: + self['cookies'][cookie.name] = dict( (attname, getattr(cookie, attname)) for attname in stored_attrs )