Bug 3018: ImportGrdb: remove calls to keys() dictionary method where possible

svn: r12572
This commit is contained in:
Gerald Britton
2009-05-26 20:48:09 +00:00
parent 51f65aa02f
commit 5eb7e18dc6
47 changed files with 134 additions and 199 deletions

View File

@@ -103,10 +103,9 @@ class TipFromFunction(object):
o = self._fetch_function()
# check if we have a handler for the object type returned
for cls in CLASS_MAP.keys():
for cls, handler in CLASS_MAP.iteritems():
if isinstance(o,cls):
return CLASS_MAP[cls](self._db, o)()
return handler(self._db, o)()
return "no tip"
__call__ = get_tip