Skip to content

Commit

Permalink
Add support for Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
pbauer committed Jun 21, 2019
1 parent 49621e3 commit d4fdab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Products/CMFFormController/Actions/BaseFormAction.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from Products.CMFFormController.utils import log
from Products.PageTemplates.Expressions import getEngine
from Products.PageTemplates.Expressions import SecureModuleImporter
from six.moves.urllib.parse import parse_qs
from six.moves.urllib.parse import urlparse
from six.moves.urllib.parse import urlunparse
from zope.interface import implementer
Expand Down Expand Up @@ -89,14 +90,13 @@ def getArg(self, controller_state):
def combineArgs(self, url, kwargs):
"""Utility method that takes a URL, parses its existing query string,
and combines the resulting dict with kwargs"""
import cgi

# parse the existing URL
parsed_url = list(urlparse(url))
# get the existing query string
qs = parsed_url[4]
# parse the query into a dict
d = cgi.parse_qs(qs, 1)
d = parse_qs(qs, 1)
# update with stuff from kwargs
for k, v in kwargs.items():
if isinstance(v, six.text_type):
Expand Down

0 comments on commit d4fdab8

Please sign in to comment.