summaryrefslogtreecommitdiff
path: root/coverage/config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-25 20:32:34 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-25 20:32:34 -0500
commit198a11535b5065416c41e7fdc025718c1a92eff3 (patch)
tree95ed70625ce48a1a55556b13fe84973359177a81 /coverage/config.py
parent1bdf48368c37bfe2de866e51133b240fda6eda36 (diff)
downloadpython-coveragepy-git-198a11535b5065416c41e7fdc025718c1a92eff3.tar.gz
test: add a test of missing sections and options
Diffstat (limited to 'coverage/config.py')
-rw-r--r--coverage/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/config.py b/coverage/config.py
index 026f8645..7ef7e7ae 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -63,7 +63,7 @@ class HandyConfigParser(configparser.RawConfigParser):
real_section = section_prefix + section
if configparser.RawConfigParser.has_section(self, real_section):
return configparser.RawConfigParser.options(self, real_section)
- raise configparser.NoSectionError
+ raise configparser.NoSectionError(section)
def get_section(self, section):
"""Get the contents of a section, as a dictionary."""
@@ -87,7 +87,7 @@ class HandyConfigParser(configparser.RawConfigParser):
if configparser.RawConfigParser.has_option(self, real_section, option):
break
else:
- raise configparser.NoOptionError
+ raise configparser.NoOptionError(option, section)
v = configparser.RawConfigParser.get(self, real_section, option, *args, **kwargs)
v = substitute_variables(v, os.environ)