From: Ian Jackson Date: Sun, 2 Apr 2017 10:13:54 +0000 (+0100) Subject: comment re comments re X-Git-Tag: hippotat/1.0.0~55^2~130 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=82302bac58d04aa04390ed0d8baebb15bf79829f;hp=5510890e40f44f7851829b3bb1e319188e993798 comment re comments re --- diff --git a/hippotat/__init__.py b/hippotat/__init__.py index d0cc799..60b779f 100644 --- a/hippotat/__init__.py +++ b/hippotat/__init__.py @@ -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):