Ver Fonte

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

Son Nguyen há 10 anos atrás
pai
commit
b406c11e5d
1 ficheiros alterados com 4 adições e 1 exclusões
  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: