Commit ee1705e2 authored by Antoine Millet's avatar Antoine Millet
Browse files

Refactored access to special arguments on calls

parent 9a62bad2
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -379,11 +379,7 @@ class RpcProtocol(Protocol):
           didnt respond.
        '''

        if '_timeout' in kwargs:
            timeout = kwargs['_timeout']
            del kwargs['_timeout']
        else:
            timeout = self._call_timeout
        timeout = kwargs.pop('_timeout', self._call_timeout)

        # Send the call to the peer:
        msg_id = self._send_call(method_name, *args, **kwargs)
@@ -419,11 +415,7 @@ class RpcProtocol(Protocol):
        '''

        # Extract _data from argument:
        if '_data' in kwargs:
            data = kwargs['_data']
            del kwargs['_data']
        else:
            data = None
        data = kwargs.pop('_data', None)
        # Send the call to the peer:
        msg_id = self._send_call(method_name, *args, **kwargs)
        # Register the call but don't wait for the response: