summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni <gianni@irecoverydata.com>2017-07-18 18:17:57 +0200
committerGianni <gianni@irecoverydata.com>2017-07-18 18:17:57 +0200
commitb26cf80fa564ffb06fead500007ee4b7f16a1dde (patch)
tree9eb0ed592201606f7e15ac2a9a67f8f6211065b3
parent160765cce97b43d7110432562a20bf11eace9a47 (diff)
downloadbottle-b26cf80fa564ffb06fead500007ee4b7f16a1dde.tar.gz
bugfix: import Morser for python 2.7
-rwxr-xr-xbottle.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bottle.py b/bottle.py
index f0eb9f3..4585866 100755
--- a/bottle.py
+++ b/bottle.py
@@ -147,7 +147,7 @@ else: # 2.x
import thread
from urlparse import urljoin, SplitResult as UrlSplitResult
from urllib import urlencode, quote as urlquote, unquote as urlunquote
- from Cookie import SimpleCookie
+ from Cookie import SimpleCookie, Morsel, CookieError
from itertools import imap
import cPickle as pickle
from StringIO import StringIO as BytesIO
@@ -965,12 +965,12 @@ class Bottle(object):
return 'error_handler_404'
"""
-
+
def decorator(callback):
if isinstance(callback, basestring): callback = load(callback)
self.error_handler[int(code)] = callback
return callback
-
+
return decorator(callback) if callback else decorator
def default_error_handler(self, res):
@@ -1838,10 +1838,10 @@ class BaseResponse(object):
"""
if not self._cookies:
self._cookies = SimpleCookie()
-
+
# To add "SameSite" cookie support.
Morsel._reserved['same-site'] = 'SameSite'
-
+
if secret:
if not isinstance(value, basestring):
depr(0, 13, "Pickling of arbitrary objects into cookies is "