summaryrefslogtreecommitdiff
path: root/portato/config_parser.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/config_parser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/portato/config_parser.py b/portato/config_parser.py
index 51592a8..eb0d42a 100644
--- a/portato/config_parser.py
+++ b/portato/config_parser.py
@@ -153,7 +153,7 @@ class ConfigParser:
"""Private method which initializes our dictionaries."""
self.vars = {"MAIN": {}}
- self.cache = None # file cache
+ self.cache = [] # file cache
self.pos = {} # stores the positions of the matches
self.sections = {"MAIN" : -1} # the line with the section header
@@ -326,6 +326,9 @@ class ConfigParser:
section = section.upper()
key = key.lower()
+ if key in self.vars[section]:
+ return self.set(key, value, section)
+
self.write()
# find line# to add
.1&id=74b0db95560e4c11439d7e0e8016d1e8cd48cdda&follow=1'>Update cgitrc templateLars Hjemli1-21/+32 2007-02-04Add support for lightweight tagsLars Hjemli2-19/+37 2007-02-04Read repo-info from /etc/cgitrcLars Hjemli5-55/+120 2007-02-04Do not die if tag has no messageLars Hjemli1-2/+2 2007-02-03Fix search for non-virtual urlsLars Hjemli1-0/+6 2007-01-28Update README with install/config informationLars Hjemli1-24/+28