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

@@ -214,10 +214,10 @@ class Spell(object):
if self.lang and Config.get(Config.SPELLCHECK):
# if LANG is not a correct key (pt_BR or pt_PT),
# try only the language part of LANG
if self.lang not in self._installed_languages.keys():
if self.lang not in self._installed_languages:
self.lang = self.lang.split('_')[0]
# if this still doesn't work we fall back to 'off'
if self.lang not in self._installed_languages.keys():
if self.lang not in self._installed_languages:
self.lang = 'off'
else:
self.lang = 'off'