Re: [PATCH iptables] iptables-test.py: print with color escapes only when stdout isatty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 14 Sep 2021 13:25:16 +0200
Phil Sutter wrote:

> Printing errors to stderr is useful to compare failing tests against an
> expected set of failures - it is simply a task of comparing output on
> stderr with a recorded one.

I see. I'm still not sure the expected convenience factor (avoiding some
grep-like post processing? but couldn't you compare the combined output
just the same?) outweighs the weirdness / least surprise factor (having
two variations of the same diagnostic message split on two separate
output streams).

> To not overcomplicate things, maybe the easiest fix would be to print
> colors only if both stdout and stderr are a tty. What do you think?

Yes, if the split has to stay, I don't have a better suggestion.

Thanks,

  Štěpán





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux