]> git.ipfire.org Git - thirdparty/nftables.git/commit
tests: py: Don't colorize output if stderr is redirected
authorPhil Sutter <phil@nwl.cc>
Thu, 7 Apr 2022 11:53:05 +0000 (13:53 +0200)
committerPhil Sutter <phil@nwl.cc>
Fri, 8 Apr 2022 14:21:32 +0000 (16:21 +0200)
commit6fa4ff56385831f01bd9d993178969a4eddbcdbf
tree73d3bbc49a22c04804ff2b0cc38b7b3703469272
parentf561a0ccb0524eded2f2b9160b5c97bc569cc5e4
tests: py: Don't colorize output if stderr is redirected

Cover for calls with '2>/tmp/log' and avoid printing escape sequences to
that file. One could still keep colored output on stdout, but that
required a printing routine for non-errors.

Signed-off-by: Phil Sutter <phil@nwl.cc>
tests/py/nft-test.py