Fix issue with spell language being None
This commit is contained in:
@@ -219,6 +219,9 @@ class Config:
|
||||
for i in range(10):
|
||||
self.recentList[i] = self._parseLine(cnfParse, cnfSec, "recent%d" % i,self.CNF_STR, self.recentList[i])
|
||||
|
||||
# Check Certain Values for None
|
||||
self.spellLanguage = self._checkNone(self.spellLanguage)
|
||||
|
||||
return True
|
||||
|
||||
def saveConfig(self):
|
||||
@@ -379,4 +382,12 @@ class Config:
|
||||
)
|
||||
return cnfDefault
|
||||
|
||||
def _checkNone(self, checkVal):
|
||||
if checkVal is None:
|
||||
return None
|
||||
if isinstance(checkVal, str):
|
||||
if checkVal.lower == "none":
|
||||
return None
|
||||
return checkVal
|
||||
|
||||
# End Class Config
|
||||
|
||||
Reference in New Issue
Block a user