From a609a2b8c31a6ea6f7a9de7ba4bdacab92725574 Mon Sep 17 00:00:00 2001 From: Chris Berkhout Date: Thu, 27 May 2021 20:15:01 +0200 Subject: [PATCH] Actually, output help to stderr, as argparse itself does. --- src/pricehist/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pricehist/cli.py b/src/pricehist/cli.py index f179786..b8c88f8 100644 --- a/src/pricehist/cli.py +++ b/src/pricehist/cli.py @@ -34,7 +34,7 @@ def cli(args=None, output_file=sys.stdout): elif args.command == "fetch": print(cmd_fetch(args), end="", file=output_file) else: - parser.print_help(file=output_file) + parser.print_help(file=sys.stderr) except BrokenPipeError: logging.debug("The output pipe was closed early.")