Explorar o código

Pass in __doc__ to Options.realize so we can get rid of wrapper scripts.

Chris McDonough %!s(int64=18) %!d(string=hai) anos
pai
achega
0285b4c284
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 3 3
      src/supervisor/supervisorctl.py
  2. 2 2
      src/supervisor/supervisord.py

+ 3 - 3
src/supervisor/supervisorctl.py

@@ -14,10 +14,10 @@
 ##############################################################################
 """supervisorctl -- control applications run by supervisord from the cmd line.
 
-Usage: python supervisorctl.py [-C URL] [-h] [action [arguments]]
+Usage: python supervisorctl.py [-c file] [-h] [action [arguments]]
 
 Options:
--c/--configuration URL -- configuration file or URL
+-c/--configuration -- configuration file path (default /etc/supervisor.conf)
 -h/--help -- print usage message and exit
 -i/--interactive -- start an interactive shell after executing commands
 -s/--serverurl URL -- URL on which supervisord server is listening
@@ -605,7 +605,7 @@ class Controller(cmd.Cmd):
 def main(args=None, options=None):
     if options is None:
         options = ClientOptions()
-    options.realize(args)
+    options.realize(args, doc=__doc__)
     c = Controller(options)
     if options.args:
         c.onecmd(" ".join(options.args))

+ 2 - 2
src/supervisor/supervisord.py

@@ -17,7 +17,7 @@
 Usage: %s [options]
 
 Options:
--c/--configuration URL -- configuration file or URL
+-c/--configuration FILENAME -- configuration file
 -n/--nodaemon -- run in the foreground (same as 'nodaemon true' in config file)
 -h/--help -- print this usage message and exit
 -u/--user USER -- run supervisord as this user (or numeric uid)
@@ -66,7 +66,7 @@ class Supervisor:
         self.process_groups = {}
 
     def main(self, args=None, test=False, first=False):
-        self.options.realize(args)
+        self.options.realize(args, doc=__doc__)
         self.options.cleanup_fds()
         info_messages = []
         critical_messages = []