diff options
Diffstat (limited to 'share/tools')
-rwxr-xr-x | share/tools/web_config/webconfig.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/share/tools/web_config/webconfig.py b/share/tools/web_config/webconfig.py index 188963c9..f5e24c48 100755 --- a/share/tools/web_config/webconfig.py +++ b/share/tools/web_config/webconfig.py @@ -11,10 +11,8 @@ IS_PY2 = sys.version_info[0] == 2 if IS_PY2: import SimpleHTTPServer import SocketServer - try: - from urllib.parse import parse_qs - except ImportError: - from cgi import parse_qs + from urlparse import parse_qs + else: import http.server as SimpleHTTPServer import socketserver as SocketServer @@ -788,7 +786,7 @@ class FishConfigHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): elif ctype == 'application/x-www-form-urlencoded': length = int(self.headers['content-length']) url_str = self.rfile.read(length).decode('utf-8') - postvars = cgi.parse_qs(url_str, keep_blank_values=1) + postvars = parse_qs(url_str, keep_blank_values=1) elif ctype == 'application/json': length = int(self.headers['content-length']) url_str = self.rfile.read(length).decode('utf-8') |