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]
|
return self._temp[section][option]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
return ConfigParser.ConfigParser.get(
|
try:
|
||||||
self, section, option, raw=True, vars=vars, fallback=fallback)
|
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:
|
except ConfigParser.InterpolationError:
|
||||||
return ConfigParser.ConfigParser.get(
|
try:
|
||||||
self, section, option, raw=True, vars=vars, fallback=fallback)
|
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:
|
except (ConfigParser.NoSectionError, ConfigParser.NoOptionError) as e:
|
||||||
try:
|
try:
|
||||||
return BMConfigDefaults[section][option]
|
return BMConfigDefaults[section][option]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user