summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2017-07-22 09:52:03 +0200
committerGitHub <noreply@github.com>2017-07-22 09:52:03 +0200
commit66544f093a2618c870313bdf3cb526c8f7fb61c1 (patch)
treef38a8b083c448d75f79132ac51d3b34f0e8ff5c2
parent5acc6e4c3684889d7cc298e467c4ab3d0d0b1349 (diff)
parentb26cf80fa564ffb06fead500007ee4b7f16a1dde (diff)
downloadbottle-66544f093a2618c870313bdf3cb526c8f7fb61c1.tar.gz
Merge pull request #986 from presveva/master
bugfix: import Morser for python 2
-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 "