Skip to content

Commit

Permalink
Fix Cython dump method
Browse files Browse the repository at this point in the history
  • Loading branch information
dnicolson authored and nikias committed Nov 26, 2023
1 parent 73b4b2d commit d1d2d36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cython/plist.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,10 @@ cpdef object dumps(value, fmt=FMT_XML, sort_keys=True, skipkeys=False):
node = Dict(value)
elif type(value) in (list, set, tuple):
node = Array(value)
else:
node = value

if fmt == FMT_XML:
return node.to_xml()
return node.to_xml().encode('utf-8')

return node.to_bin()

0 comments on commit d1d2d36

Please sign in to comment.