~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-20 14:52:31 UTC
  • mfrom: (4547.3.1 hpss-debug-buglet)
  • Revision ID: pqm@pqm.ubuntu.com-20090720145231-zntxtpyaoujmkrsz
(andrew) Fix minor KeyError bug in -Dhpss when logging requests for
        unregistered methods.

Show diffs side-by-side

added added

removed removed

Lines of Context:
519
519
        # Increment the count in the WeakKeyDictionary
520
520
        value = self.counts[params.medium]
521
521
        value['count'] += 1
522
 
        request_method = request.request_handlers.get(params.method)
 
522
        try:
 
523
            request_method = request.request_handlers.get(params.method)
 
524
        except KeyError:
 
525
            # A method we don't know about doesn't count as a VFS method.
 
526
            return
523
527
        if issubclass(request_method, vfs.VfsRequest):
524
528
            value['vfs_count'] += 1
525
529