chiark / gitweb /
comment re comments re
[hippotat.git] / hippotat / __init__.py
index d0cc79902753286e2afa0c254297094e5c73de8d..60b779f1dcb3253bbe4b9011a1c671004c7d6483 100644 (file)
@@ -405,8 +405,9 @@ def process_cfg_clients(constructor):
 #---------- startup ----------
 
 def common_startup(process_cfg):
-  re = regexp.compile('#.*')
-  cfg.read_string(re.sub('', defcfg))
+  # ConfigParser hates #-comments after values
+  trailingcomments_re = regexp.compile('#.*')
+  cfg.read_string(trailingcomments_re.sub('', defcfg))
   need_defcfg = True
 
   def readconfig(pathname, mandatory=True):