зеркало из https://github.com/mozilla/gecko-dev.git
Bug 159625 - Fix exception in cors-tester.py in WPT tests r=jgraham
cookie.value can't be accessed when cookie.first defaults to "no" which causes it to throw an exception. This change makes it so we only access cookie.value when the cookie.first actually returns a cookie. Differential Revision: https://phabricator.services.mozilla.com/D53167 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
f918f7fc49
Коммит
014cc496af
|
@ -31,9 +31,9 @@ def main(request, response):
|
|||
|
||||
cors = request.headers.get("origin", "no")
|
||||
|
||||
cookie = request.cookies.first(id, "no")
|
||||
|
||||
line = 'cors = ' + cors + ' | cookie = ' + cookie.value;
|
||||
cookie = request.cookies.first(id, None)
|
||||
cookie_value = cookie.value if cookie is not None else "no"
|
||||
line = 'cors = ' + cors + ' | cookie = ' + cookie_value;
|
||||
|
||||
data = request.server.stash.take(id)
|
||||
if data is not None:
|
||||
|
|
Загрузка…
Ссылка в новой задаче