Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
use args in api calling to match upstream behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
lxyu committed Aug 19, 2014
1 parent d84be6a commit 472fb7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion thriftpy/thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ def process_in(self, iprot):
args.read(iprot)
iprot.read_message_end()
result = getattr(self._service, api + "_result")()
call = lambda: getattr(self._handler, api)(**args.__dict__)

# convert kwargs to args
api_args = [args.thrift_spec[k][1]
for k in sorted(args.thrift_spec)]
call = lambda: getattr(self._handler, api)(
*(args.__dict__[k] for k in api_args)
)
return api, seqid, result, call

def send_exception(self, oprot, api, exc, seqid):
Expand Down

0 comments on commit 472fb7f

Please sign in to comment.