changeset 9339:9be91129c96e

config: improve code readability
author Andrey <py4fun@gmail.com>
date Wed, 12 Aug 2009 11:50:27 +0200
parents 4cc0815a0dd4
children 3ebb457d2189
files mercurial/config.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/config.py	Wed Aug 12 10:57:18 2009 +0200
+++ b/mercurial/config.py	Wed Aug 12 11:50:27 2009 +0200
@@ -80,7 +80,7 @@
         section = ""
         item = None
         line = 0
-        cont = 0
+        cont = False
 
         for l in data.splitlines(True):
             line += 1
@@ -114,7 +114,7 @@
             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 @@
                     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):