Fix the config value when changing from NoneType to something else

This commit is contained in:
Andrew Resch 2008-08-14 06:37:20 +00:00
parent c4d620f0b9
commit a6700ba22c
1 changed files with 1 additions and 1 deletions

View File

@ -118,7 +118,7 @@ class Config:
oldtype, newtype = type(self.config[key]), type(value) oldtype, newtype = type(self.config[key]), type(value)
if value is not None and oldtype != newtype: if value is not None and oldtype != type(None) and oldtype != newtype:
try: try:
value = oldtype(value) value = oldtype(value)
except ValueError: except ValueError: