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

svn: r12562
This commit is contained in:
Gerald Britton
2009-05-22 18:43:40 +00:00
parent 5c9d8ab7ff
commit fc90d5fce2
16 changed files with 45 additions and 47 deletions

View File

@@ -204,7 +204,7 @@ class StandardCustomSelector(object):
int_val = self.custom_key
str_val = self.selector.child.get_text().strip()
if str_val in self.mapping.values():
for key in self.mapping.keys():
for key in self.mapping:
if str_val == self.mapping[key]:
int_val = key
break
@@ -220,7 +220,7 @@ class StandardCustomSelector(object):
@type val: tuple
"""
key, text = val
if key in self.mapping.keys() and key != self.custom_key:
if key in self.mapping and key != self.custom_key:
self.store.foreach(self.set_int_value, key)
elif self.custom_key is not None:
self.selector.child.set_text(text)