From 70c1ae8864769025ffec24822985a310377c69df Mon Sep 17 00:00:00 2001 From: David Kerkeslager Date: Thu, 28 Nov 2019 13:36:49 -0500 Subject: [PATCH] Fix exception from improperly imported http.cookies --- phial.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phial.py b/phial.py index 5d083d3..411c077 100644 --- a/phial.py +++ b/phial.py @@ -1,5 +1,5 @@ import collections -import http.cookie +import http.cookies import json import urllib.parse @@ -49,9 +49,9 @@ class Request(_Request): content_length = 0 try: - cookie = http.cookie.SimpleCookie(env.get('HTTP_COOKIE')) + cookie = http.cookies.SimpleCookie(env.get('HTTP_COOKIE')) except: - cookie = http.cookie.SimpleCookie() + cookie = http.cookies.SimpleCookie() try: @@ -218,7 +218,7 @@ def route_on_method(**kwargs): handlers[method] = kwargs.pop(method) method_not_allowed_handler = kwargs.pop( - method_not_allowed, + 'method_not_allowed', default_method_not_allowed_handler, ) -- 2.20.1