summaryrefslogtreecommitdiff
path: root/paste/errordocument.py
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:49:12 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:49:12 +0100
commit674ae7718bc06a8b8c8b658075bf82c8198fb632 (patch)
tree0075bace24ead7f03ae7cb18935e4c707f71a860 /paste/errordocument.py
parent3cdb7e4227cbaad690b1c1557c03fa6da0decc36 (diff)
downloadpaste-674ae7718bc06a8b8c8b658075bf82c8198fb632.tar.gz
Python 3: use new names of standard library modules
Use "try/except ImportError" to try Python 2 and Python 3 names.
Diffstat (limited to 'paste/errordocument.py')
-rw-r--r--paste/errordocument.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/errordocument.py b/paste/errordocument.py
index e57c162..8b7d81c 100644
--- a/paste/errordocument.py
+++ b/paste/errordocument.py
@@ -11,7 +11,7 @@ URL where the content can be displayed to the user as an error document.
import warnings
import sys
-from urlparse import urlparse
+from six.moves.urllib import parse as urlparse
from paste.recursive import ForwardRequestException, RecursiveMiddleware, RecursionLoop
from paste.util import converters
from paste.response import replace_header
@@ -342,7 +342,7 @@ class _StatusBasedRedirect(object):
new_environ = {}
for k, v in environ.items():
if k != 'QUERY_STRING':
- new_environ['QUERY_STRING'] = urlparse(url_)[4]
+ new_environ['QUERY_STRING'] = urlparse.urlparse(url_)[4]
else:
new_environ[k] = v
class InvalidForward(Exception):