summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2021-04-30 14:16:02 +0200
committerEmilio Pozuelo Monfort <pochu@debian.org>2021-04-30 14:31:02 +0200
commit74b6bd26b820b76a01a1ebb3dccd743efd90d23e (patch)
tree6ea15d6a40e608bd94c28a672804511a203aec23 /lib
parentfe08a6a9d176bd198894f7ff58ae2417a0ce9f24 (diff)
web_support: call parse_qs from urllib
The one from cgi has been removed in Python 3.8.
Diffstat (limited to 'lib')
-rw-r--r--lib/python/web_support.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/python/web_support.py b/lib/python/web_support.py
index 9c73ef5796..8d3573c1dc 100644
--- a/lib/python/web_support.py
+++ b/lib/python/web_support.py
@@ -31,6 +31,11 @@ except ImportError:
from urllib.parse import quote as urllib_quote
try:
+ from cgi import parse_qs
+except ImportError:
+ from urllib.parse import parse_qs
+
+try:
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
except ImportError:
@@ -838,7 +843,7 @@ class WebServiceHTTP(WebServiceBase):
path = self.path[:pos]
if path[:1] != '/':
path = '/' + path
- params = cgi.parse_qs(self.path[pos + 1:])
+ params = parse_qs(self.path[pos + 1:])
return (path, params)
def route(self):

© 2014-2024 Faster IT GmbH | imprint | privacy policy