Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lionick committed Sep 4, 2024
1 parent 51e88ea commit 4b325b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idpyoidc/message/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ def to_urlencoded(self, doseq=False):
params.append((key, str(val)))

try:
return urlencode(params, doseq)
return urlencode(params, doseq=doseq)
except UnicodeEncodeError:
_val = []
for k, v in params:
try:
_val.append((k, v.encode("utf-8")))
except TypeError:
_val.append((k, v))
return urlencode(_val, doseq)
return urlencode(_val, doseq=doseq)

def serialize(self, method="urlencoded", **kwargs):
"""
Expand Down

0 comments on commit 4b325b4

Please sign in to comment.