Rename ConfigValueException to ConfigOptionException
This commit is contained in:
parent
1e915b5007
commit
6ac3f14868
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ class ConfigSectionException(ConfigException):
|
||||||
self.section
|
self.section
|
||||||
)
|
)
|
||||||
|
|
||||||
class ConfigValueException(ConfigException):
|
class ConfigOptionException(ConfigException):
|
||||||
def __init__(self, section: str, value: str):
|
def __init__(self, section: str, value: str):
|
||||||
self.section = section
|
self.section = section
|
||||||
self.value = value
|
self.value = value
|
||||||
|
@ -72,6 +72,6 @@ class Config(configparser.ConfigParser):
|
||||||
raise ConfigSectionException(section)
|
raise ConfigSectionException(section)
|
||||||
|
|
||||||
if not self.has_option(section, option):
|
if not self.has_option(section, option):
|
||||||
raise ConfigValueException(section, option)
|
raise ConfigOptionException(section, option)
|
||||||
|
|
||||||
return super().get(section, option, *args, **kwargs)
|
return super().get(section, option, *args, **kwargs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue