Commit 3505dff2 authored by Timothy Stack's avatar Timothy Stack

Update scrubdict to change Sets to lists.

parent 662e924f
......@@ -4507,6 +4507,8 @@ def nfspath(value):
return retval
from sets import Set
# Scrub a dictionary returned by an SQL query so that it can be sent through
# the XML-RPC marshaller without error.
......@@ -4525,6 +4527,9 @@ def scrubdict(retval, prunelist=[], defaultvals={}):
del retval[key]
elif isinstance(retval[key], Set):
retval[key] = list(retval[key])
elif isinstance(retval[key], datetime.datetime):
retval[key] = xmlrpclib.DateTime(
time.strptime(str(retval[key]), "%Y-%m-%d %H:%M:%S"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment