/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-20 03:23:31 UTC
  • mto: This revision was merged to the branch mainline in revision 4555.
  • Revision ID: andrew.bennetts@canonical.com-20090720032331-6bn0zmkc9rmkuyxf
Fix minor bug in -Dhpss that would cause a KeyError when issuing a request for a method not registered in request_handlers.

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