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:
@ -227,10 +227,7 @@ def set_env_colors(env_colors=None):
|
||||
|
||||
def piped_output():
|
||||
"""Return False if stdout is a TTY. True if output is being piped to another program"""
|
||||
if sys.stdout.isatty():
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
return False if sys.stdout.isatty() else True
|
||||
|
||||
|
||||
def ctrlc(signum, frame):
|
||||
|
Reference in New Issue
Block a user