##// END OF EJS Templates
config: improve code readability
Andrey -
r9339:9be91129 default
parent child Browse files
Show More
@@ -80,7 +80,7 b' class config(object):'
80 80 section = ""
81 81 item = None
82 82 line = 0
83 cont = 0
83 cont = False
84 84
85 85 for l in data.splitlines(True):
86 86 line += 1
@@ -114,7 +114,7 b' class config(object):'
114 114 m = itemre.match(l)
115 115 if m:
116 116 item = m.group(1)
117 cont = 1
117 cont = True
118 118 if sections and section not in sections:
119 119 continue
120 120 self.set(section, item, m.group(2), "%s:%d" % (src, line))
@@ -128,7 +128,7 b' class config(object):'
128 128 del self._data[section][name]
129 129 continue
130 130
131 raise error.ConfigError(_('config error at %s:%d: \'%s\'')
131 raise error.ConfigError(_("config error at %s:%d: '%s'")
132 132 % (src, line, l.rstrip()))
133 133
134 134 def read(self, path, fp=None, sections=None, remap=None):
General Comments 0
You need to be logged in to leave comments. Login now