Fix the config value when changing from NoneType to something else
This commit is contained in:
parent
c4d620f0b9
commit
a6700ba22c
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue