def _handle_remote_call(self, fname):
        def do_call(**kwargs):
            data = {
                '_call': fname,
                '_output': self.transport_type,
                '_input': self.transport_type,
                '_wrapper': self.wrapper_type,
                '_access_key': self.access_key or '',
                '_version': self.version
            }

            formatter = formatters[self.transport_type](None, None)

            for key, value in kwargs.iteritems():
                kwargs[key] = formatter.kwargs(value)

            data.update(kwargs)

            try:
                response = urllib.urlopen(self.ns,
                                          urllib.urlencode(data))

                assert [200,] in response.getcode(), \
                    u'HTTP-Server returned http code %s (expected: 200) ' % \
                    response.getcode()

                response_buffer = response.read()
            except IOError, e:
                raise ConnectionException(e)

            try:
                response = formatter.parse(response_buffer)
            except (cPickle.UnpicklingError, EOFError), _:
                raise ClientException(
                    u'Couldn\'t unpickle response ' \
                    'data. Did you added "pickle" to the namespace\'s' \
                    ' __features__ list?'
                )
            except ValueError, e:
                raise ConnectionException, e

            if response.get('success'):
                return response.get('result')
            else:
                raise RemoteException(". ".join(response.get('errors')))

        return do_call
dataset/ETHPy150Open flosch/simpleapi/simpleapi/client/client.py/Client._handle_remote_call/swapped operands of `in`