unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] nmbug-status: print config errors to stderr
@ 2015-10-03  7:57 Jani Nikula
  2015-10-03  9:08 ` Tomi Ollila
  2015-10-04 10:24 ` David Bremner
  0 siblings, 2 replies; 4+ messages in thread
From: Jani Nikula @ 2015-10-03  7:57 UTC (permalink / raw)
  To: notmuch

Particularly scripted usage with stdout redirection can be confusing
if errors are printed to stdout instead of stderr.
---
 devel/nmbug/nmbug-status | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
index a289798e3cc1..b36b6ad33859 100755
--- a/devel/nmbug/nmbug-status
+++ b/devel/nmbug/nmbug-status
@@ -318,7 +318,7 @@ args = parser.parse_args()
 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>
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nmbug-status: print config errors to stderr
  2015-10-03  7:57 [PATCH] nmbug-status: print config errors to stderr Jani Nikula
@ 2015-10-03  9:08 ` Tomi Ollila
  2015-10-03 20:33   ` W. Trevor King
  2015-10-04 10:24 ` David Bremner
  1 sibling, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2015-10-03  9:08 UTC (permalink / raw)
  To: Jani Nikula, notmuch

On Sat, Oct 03 2015, Jani Nikula <jani@nikula.org> wrote:

> Particularly scripted usage with stdout redirection can be confusing
> if errors are printed to stdout instead of stderr.

LGTM

> ---
>  devel/nmbug/nmbug-status | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status
> index a289798e3cc1..b36b6ad33859 100755
> --- a/devel/nmbug/nmbug-status
> +++ b/devel/nmbug/nmbug-status
> @@ -318,7 +318,7 @@ args = parser.parse_args()
>  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>
> -- 
> 2.1.4
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nmbug-status: print config errors to stderr
  2015-10-03  9:08 ` Tomi Ollila
@ 2015-10-03 20:33   ` W. Trevor King
  0 siblings, 0 replies; 4+ messages in thread
From: W. Trevor King @ 2015-10-03 20:33 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On Sat, Oct 03, 2015 at 12:08:05PM +0300, Tomi Ollila wrote:
> On Sat, Oct 03 2015, Jani Nikula wrote:
> > Particularly scripted usage with stdout redirection can be
> > confusing if errors are printed to stdout instead of stderr.
> 
> LGTM

Me too.

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nmbug-status: print config errors to stderr
  2015-10-03  7:57 [PATCH] nmbug-status: print config errors to stderr Jani Nikula
  2015-10-03  9:08 ` Tomi Ollila
@ 2015-10-04 10:24 ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2015-10-04 10:24 UTC (permalink / raw)
  To: Jani Nikula, notmuch

Jani Nikula <jani@nikula.org> writes:

> Particularly scripted usage with stdout redirection can be confusing
> if errors are printed to stdout instead of stderr.

pushed

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-04 10:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-03  7:57 [PATCH] nmbug-status: print config errors to stderr Jani Nikula
2015-10-03  9:08 ` Tomi Ollila
2015-10-03 20:33   ` W. Trevor King
2015-10-04 10:24 ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).