Rev 4555: (andrew) Fix minor KeyError bug in -Dhpss when logging requests for in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Jul 20 15:52:34 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4555 [merge]
revision-id: pqm at pqm.ubuntu.com-20090720145231-zntxtpyaoujmkrsz
parent: pqm at pqm.ubuntu.com-20090720124706-b52fp9fcciu17np7
parent: andrew.bennetts at canonical.com-20090720032331-6bn0zmkc9rmkuyxf
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-07-20 15:52:31 +0100
message:
(andrew) Fix minor KeyError bug in -Dhpss when logging requests for
unregistered methods.
modified:
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
=== modified file 'bzrlib/smart/medium.py'
--- a/bzrlib/smart/medium.py 2009-07-07 04:31:47 +0000
+++ b/bzrlib/smart/medium.py 2009-07-20 03:23:31 +0000
@@ -519,7 +519,11 @@
# Increment the count in the WeakKeyDictionary
value = self.counts[params.medium]
value['count'] += 1
- request_method = request.request_handlers.get(params.method)
+ try:
+ request_method = request.request_handlers.get(params.method)
+ except KeyError:
+ # A method we don't know about doesn't count as a VFS method.
+ return
if issubclass(request_method, vfs.VfsRequest):
value['vfs_count'] += 1
More information about the bazaar-commits
mailing list