~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/client.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 06:49:10 UTC
  • mfrom: (3731.2.7 hpss-call-count)
  • Revision ID: pqm@pqm.ubuntu.com-20081001064910-typ6d7diwd53z6iv
Extend -Dhpss flag to report HPSS call count on stderr. (Andrew
        Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    def _run_call_hooks(self, method, args, body, readv_body):
57
57
        if not _SmartClient.hooks['call']:
58
58
            return
59
 
        params = CallHookParams(method, args, body, readv_body)
 
59
        params = CallHookParams(method, args, body, readv_body, self._medium)
60
60
        for hook in _SmartClient.hooks['call']:
61
61
            hook(params)
62
62
            
187
187
 
188
188
class CallHookParams(object):
189
189
    
190
 
    def __init__(self, method, args, body, readv_body):
 
190
    def __init__(self, method, args, body, readv_body, medium):
191
191
        self.method = method
192
192
        self.args = args
193
193
        self.body = body
194
194
        self.readv_body = readv_body
 
195
        self.medium = medium
195
196
 
196
197
    def __repr__(self):
197
198
        attrs = dict((k, v) for (k, v) in self.__dict__.iteritems()