1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

simplify piped_output function

This commit is contained in:
Kelly Brazil
2021-05-11 14:30:46 -07:00
parent 947cf41dfa
commit c543f00bd3

View File

@ -227,10 +227,7 @@ def set_env_colors(env_colors=None):
def piped_output(): def piped_output():
"""Return False if stdout is a TTY. True if output is being piped to another program""" """Return False if stdout is a TTY. True if output is being piped to another program"""
if sys.stdout.isatty(): return False if sys.stdout.isatty() else True
return False
else:
return True
def ctrlc(signum, frame): def ctrlc(signum, frame):