浏览代码

Add inline_comment_prefixes support to supervisorctl's config (for Py3)

Son Nguyen 10 年之前
父节点
当前提交
b406c11e5d
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      supervisor/options.py

+ 4 - 1
supervisor/options.py

@@ -1601,7 +1601,10 @@ class ClientOptions(Options):
                 need_close = True
             except (IOError, OSError):
                 raise ValueError("could not read config file %s" % fp)
-        config = UnhosedConfigParser()
+        kwargs = {}
+        if PY3:
+            kwargs['inline_comment_prefixes'] = (';','#')
+        config = UnhosedConfigParser(**kwargs)
         config.expansions = self.environ_expansions
         config.mysection = 'supervisorctl'
         try: