]> git.notmuchmail.org Git - notmuch/commitdiff
nmbug-status: print config errors to stderr
authorJani Nikula <jani@nikula.org>
Sat, 3 Oct 2015 07:57:56 +0000 (10:57 +0300)
committerDavid Bremner <david@tethera.net>
Sun, 4 Oct 2015 10:22:03 +0000 (07:22 -0300)
Particularly scripted usage with stdout redirection can be confusing
if errors are printed to stdout instead of stderr.

devel/nmbug/nmbug-status

index a289798e3cc18559584de5cccda81d0f95c4e392..b36b6ad33859d7f8ba4b59381c7d147385878a9d 100755 (executable)
@@ -318,7 +318,7 @@ args = parser.parse_args()
 try:
     config = read_config(path=args.config)
 except ConfigError as e:
 try:
     config = read_config(path=args.config)
 except ConfigError as e:
-    print(e)
+    print(e, file=sys.stderr)
     sys.exit(1)
 
 header_template = config['meta'].get('header', '''<!DOCTYPE html>
     sys.exit(1)
 
 header_template = config['meta'].get('header', '''<!DOCTYPE html>