Handle missing keyword in python2 configparser.
This commit is contained in:
parent
a692c19faa
commit
d5d3f7423f
|
@ -74,11 +74,19 @@ class BMConfigParser(ConfigParser.SafeConfigParser):
|
|||
return self._temp[section][option]
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
return ConfigParser.ConfigParser.get(
|
||||
self, section, option, raw=True, vars=vars, fallback=fallback)
|
||||
except TypeError:
|
||||
return ConfigParser.ConfigParser.get(
|
||||
self, section, option, raw=True, vars=vars)
|
||||
except ConfigParser.InterpolationError:
|
||||
try:
|
||||
return ConfigParser.ConfigParser.get(
|
||||
self, section, option, raw=True, vars=vars, fallback=fallback)
|
||||
except TypeError:
|
||||
return ConfigParser.ConfigParser.get(
|
||||
self, section, option, raw=True, vars=vars)
|
||||
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) as e:
|
||||
try:
|
||||
return BMConfigDefaults[section][option]
|
||||
|
|
Loading…
Reference in New Issue
Block a user