config: improve code readability
authorAndrey <py4fun@gmail.com>
Wed, 12 Aug 2009 11:50:27 +0200
changeset 9339 9be91129c96e
parent 9338 4cc0815a0dd4
child 9343 3ebb457d2189
config: improve code readability
mercurial/config.py
--- 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):