cookies.morsel_to_cookie(morsel) raise TypeError repaired.
authorwasw100 <wasw100@gmail.com>
Thu, 6 Jun 2013 11:15:09 +0000 (19:15 +0800)
committerwasw100 <wasw100@gmail.com>
Thu, 6 Jun 2013 11:15:09 +0000 (19:15 +0800)
morsel_to_cookie(mosel) method raise TypeError: create_cookie() got unexpected keyword arguments: ['path_specified', 'domain_specified', 'port_specified', 'domain_initial_dot'].

so we should remove these param from create_cookie(...)

requests/cookies.py

index d759d0a..6b2d4cd 100644 (file)
@@ -359,12 +359,8 @@ def morsel_to_cookie(morsel):
         value=morsel.value,
         version=morsel['version'] or 0,
         port=None,
-        port_specified=False,
         domain=morsel['domain'],
-        domain_specified=bool(morsel['domain']),
-        domain_initial_dot=morsel['domain'].startswith('.'),
         path=morsel['path'],
-        path_specified=bool(morsel['path']),
         secure=bool(morsel['secure']),
         expires=morsel['max-age'] or morsel['expires'],
         discard=False,