Changeset 504

Show
Ignore:
Timestamp:
03/19/06 01:11:25 (2 years ago)
Author:
athomas
Message:

XmlRpcPlugin:

  • Added support for returning sets (cast to tuple)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • xmlrpcplugin/0.10/tracrpc/api.py

    r229 r504  
    44import types 
    55import xmlrpclib 
     6try: 
     7    set = set 
     8except: 
     9    from sets import Set as set 
    610 
    711RPC_TYPES = {int: 'int', bool: 'boolean', str: 'string', float: 'double', 
     
    8286        # We'll fully traverse the generator results and return it as a tuple 
    8387        elif type(result) is types.GeneratorType: 
     88            result = tuple(result) 
     89        elif type(result) is set: 
    8490            result = tuple(result) 
    8591        return (result,)