Fix config file load for bad/old style Python syntax

This commit is contained in:
prculley 2018-11-10 11:13:42 -06:00 committed by Nick Hall
parent c04b6f6fdf
commit f4c94c48b4

View File

@ -299,7 +299,12 @@ class ConfigManager:
continue # with next setting
####################### End upgrade code
else:
value = safe_eval(raw_value)
try:
value = safe_eval(raw_value)
except:
# most likely exception is SyntaxError but
# others are possible ex: '0L' from Python2 days
value = None
####################### Now, let's test and set:
if (name in self.default and
setting in self.default[name]):