[Mailman-Users] mailmanctl's usage message

Richard Barrett r.barrett at openinfo.co.uk
Sat Aug 14 23:26:45 CEST 2004


You could consider running mailmanctl with the -h/--help option to get 
the usage printed without logging an error. The Mailman command line 
scripts are all fairly consistent in having the -h/--help option.

On 14 Aug 2004, at 20:31, David Relson wrote:

> Hi,
>
> I don't run mailmanctl very often.  Since I don't remember its options,
> I often start by running "mailmanctl" (with no arguments).  When I do
> so, it's nice enough to print the usage message to stderr.  However,
> I've also noticed that a timestamped copy of the usage message appears
> in .../mailman/logs/error as well as message "No command given." (also
> with a timestamp).
>
> I took a look at the code and changed the behavior.  Here's my patch:
>
> --- mailmanctl~	2004-05-20 16:27:29.000000000 -0400
> +++ mailmanctl	2004-08-14 15:24:00.966478400 -0400
> @@ -132,7 +132,7 @@
>          fd = sys.stderr
>      else:
>          fd = sys.stdout
> -    print >> fd, _(__doc__)
> +    print >> sys.stdout, _(__doc__)
>      if msg:
>          print >> fd, msg
>      sys.exit(code)
>
> I don't know that this is the _best_ way to handle this.  If there's a
> better way, let me know :-)
>
> Regards,
>
> David
>
> -- 
> David Relson                   Osage Software Systems, Inc.
> relson at osagesoftware.com       Ann Arbor, MI 48103
> www.osagesoftware.com          tel:  734.821.8800




More information about the Mailman-Users mailing list