summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-03-10 16:46:07 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-03-10 16:46:07 +0100
commite5d7bb56758bdc465bf6e5dd0c481362f30e63e4 (patch)
tree986d0aff19e3db118ea4d66db14c58af5f91198d /portato
parent60c9d2fbf81163f1c86633094048b3bb79cc22dc (diff)
downloadportato-e5d7bb56758bdc465bf6e5dd0c481362f30e63e4.tar.gz
portato-e5d7bb56758bdc465bf6e5dd0c481362f30e63e4.tar.bz2
portato-e5d7bb56758bdc465bf6e5dd0c481362f30e63e4.zip
Generate correct KeyNotFoundException
Diffstat (limited to '')
-rw-r--r--portato/config_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/portato/config_parser.py b/portato/config_parser.py
index f4c6218..ee838b2 100644
--- a/portato/config_parser.py
+++ b/portato/config_parser.py
@@ -291,12 +291,12 @@ class ConfigParser:
"""
try:
- section = self.vars[section]
+ sectiondict = self.vars[section]
except KeyError:
raise SectionNotFoundException("Section '%s' not found in file '%s'." % (section, self.file))
try:
- return section[key]
+ return sectiondict[key]
except KeyError:
raise KeyNotFoundException("Key '%s' not found in section '%s' in file '%s'." % (key, section, self.file))