# HG changeset patch # User Andrey # Date 2009-08-12 09:50:27 # Node ID 9be91129c96e4c98360744ca06e48dc5d5b7d23c # Parent 4cc0815a0dd4fc46ba89c2b92da5c1f23be8bf98 config: improve code readability diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -80,7 +80,7 @@ class config(object): section = "" item = None line = 0 - cont = 0 + cont = False for l in data.splitlines(True): line += 1 @@ -114,7 +114,7 @@ class config(object): m = itemre.match(l) if m: item = m.group(1) - cont = 1 + cont = True if sections and section not in sections: continue self.set(section, item, m.group(2), "%s:%d" % (src, line)) @@ -128,7 +128,7 @@ class config(object): del self._data[section][name] continue - raise error.ConfigError(_('config error at %s:%d: \'%s\'') + raise error.ConfigError(_("config error at %s:%d: '%s'") % (src, line, l.rstrip())) def read(self, path, fp=None, sections=None, remap=None):