From 734a7d8a6831b17313091a80817b30403118132f Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Wed, 3 Aug 2016 17:45:41 +0530 Subject: [PATCH] Minor refactor --- netlib/http/cookies.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/netlib/http/cookies.py b/netlib/http/cookies.py index 6fec7dafe..2a1f62f05 100644 --- a/netlib/http/cookies.py +++ b/netlib/http/cookies.py @@ -185,8 +185,7 @@ def parse_set_cookie_headers(headers): for header in headers: cookies = parse_set_cookie_header(header) if cookies: - for cookie in cookies: - name, value, attrs = cookie + for name, value, attrs in cookies: ret.append((name, SetCookie(value, attrs))) return ret @@ -221,6 +220,8 @@ def parse_set_cookie_header(line): if cookies: return cookies + else: + return None def format_set_cookie_header(name, value, attrs):