cookies.morsel_to_cookie(morsel) raise TypeError repaired.

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(...)
This commit is contained in:
wasw100
2013-06-06 19:15:09 +08:00
parent 3bb13f8fbb
commit 961790f95c
-4
View 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,