~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/client.py

remove all trailing whitespace from bzr source

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
        params = CallHookParams(method, args, body, readv_body, self._medium)
60
60
        for hook in _SmartClient.hooks['call']:
61
61
            hook(params)
62
 
            
 
62
 
63
63
    def _call_and_read_response(self, method, args, body=None, readv_body=None,
64
64
            expect_response_body=True):
65
65
        self._run_call_hooks(method, args, body, readv_body)
125
125
 
126
126
    def call_expecting_body(self, method, *args):
127
127
        """Call a method and return the result and the protocol object.
128
 
        
 
128
 
129
129
        The body can be read like so::
130
130
 
131
131
            result, smart_protocol = smart_client.call_expecting_body(...)
167
167
 
168
168
    def remote_path_from_transport(self, transport):
169
169
        """Convert transport into a path suitable for using in a request.
170
 
        
 
170
 
171
171
        Note that the resulting remote path doesn't encode the host name or
172
172
        anything but path, so it is only safe to use it in requests sent over
173
173
        the medium from the matching transport.
181
181
        hooks.Hooks.__init__(self)
182
182
        self['call'] = []
183
183
 
184
 
        
 
184
 
185
185
_SmartClient.hooks = SmartClientHooks()
186
186
 
187
187
 
188
188
class CallHookParams(object):
189
 
    
 
189
 
190
190
    def __init__(self, method, args, body, readv_body, medium):
191
191
        self.method = method
192
192
        self.args = args