diff options
author | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:49:12 +0100 |
---|---|---|
committer | Cyril Roelandt <cyril.roelandt@enovance.com> | 2014-03-18 12:49:12 +0100 |
commit | 674ae7718bc06a8b8c8b658075bf82c8198fb632 (patch) | |
tree | 0075bace24ead7f03ae7cb18935e4c707f71a860 /paste/httpserver.py | |
parent | 3cdb7e4227cbaad690b1c1557c03fa6da0decc36 (diff) | |
download | paste-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/httpserver.py')
-rwxr-xr-x | paste/httpserver.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/paste/httpserver.py b/paste/httpserver.py index b7d6640..126c28a 100755 --- a/paste/httpserver.py +++ b/paste/httpserver.py @@ -19,7 +19,8 @@ if pyOpenSSL is installed, it also provides SSL capabilities. import atexit import traceback -import socket, sys, threading, urlparse, Queue, urllib +from six.moves.urllib.parse import unquote +import socket, sys, threading, urlparse, Queue import posixpath import time import thread @@ -179,7 +180,7 @@ class WSGIHandlerMixin: dummy_url = 'http://dummy%s' % (self.path,) (scheme, netloc, path, query, fragment) = urlparse.urlsplit(dummy_url) - path = urllib.unquote(path) + path = unquote(path) endslash = path.endswith('/') path = posixpath.normpath(path) if endslash and path != '/': |