summaryrefslogtreecommitdiff
path: root/cron/bumpdigests
diff options
context:
space:
mode:
authorbwarsaw2002-10-21 22:36:58 +0000
committerbwarsaw2002-10-21 22:36:58 +0000
commit17da8273eb61687e1eb7c1e068613036fc1f3f46 (patch)
tree32dbcb9bb3a6bc8726cf9442dca618674cb93544 /cron/bumpdigests
parent993c8e5ba7e39b71b219aa20192bc98be7d29db1 (diff)
downloadmailman-17da8273eb61687e1eb7c1e068613036fc1f3f46.tar.gz
mailman-17da8273eb61687e1eb7c1e068613036fc1f3f46.tar.zst
mailman-17da8273eb61687e1eb7c1e068613036fc1f3f46.zip
Jon Parise's patch to improve the usage() output for the command line
and cron scripts. When code/status == 0, there's no error (it's likely --help output) so send that to stdout. Otherwise, it's an error and the output goes to stderr.
Diffstat (limited to 'cron/bumpdigests')
-rw-r--r--cron/bumpdigests8
1 files changed, 6 insertions, 2 deletions
diff --git a/cron/bumpdigests b/cron/bumpdigests
index b6078f3f9..3636fc6ec 100644
--- a/cron/bumpdigests
+++ b/cron/bumpdigests
@@ -48,9 +48,13 @@ PROGRAM = sys.argv[0]
def usage(code, msg=''):
- print >> sys.stderr, _(__doc__)
+ if code:
+ fd = sys.stderr
+ else:
+ fd = sys.stdout
+ print >> fd, _(__doc__)
if msg:
- print >> sys.stderr, msg
+ print >> fd, msg
sys.exit(code)