Changes between Version 10 and Version 11 of Jsonrpc


Ignore:
Timestamp:
May 27, 2010, 1:41:04 AM (14 years ago)
Author:
newacct
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Jsonrpc

    v10 v11  
    3535    def find_person(attribs):
    3636
    37         filters = {}
    38         for key in attribs.keys():
    39             if key in ("first_name", "last_name"):
    40                 filters[key] = attribs[key]
     37        filters = dict((key, val) for key, val in attribs.items()
     38                       if key in ("first_name", "last_name"))
    4139
    4240        return [
     
    108106    def get_args(self):
    109107        from inspect import getargspec
    110         return [ a for a in getargspec(self.method).args if (a != "self") ]
     108        return [ a for a in getargspec(self.method).args if a != "self" ]
    111109
    112110class JsonRpc(object):
     
    125123        return [
    126124            m for m in dir(self.instance) if \
    127             (getattr(self.instance, m).__class__.__name__ == "publicmethod") and \
    128             (getattr(self.instance, m).__public__ == True)
     125            getattr(self.instance, m).__class__.__name__ == "publicmethod" and \
     126            getattr(self.instance, m).__public__ == True
    129127        ]
    130128
     
    236234        data = simplejson.loads(request.raw_post_data)
    237235        # Altered to forward the request parameter when a member method
    238         # is invocated <julien@pimentech.net>
     236        # is invoked <julien@pimentech.net>
    239237        id, method, params = data["id"],data["method"],[request,]+data["params"]
    240238        if method in self.method_map:
Back to Top