Commit 22a5da58 authored by Chris Lamb's avatar Chris Lamb 💬

bin/ Correct undefined reference to `colored` when stdout is not a TTY

parent 28db1e4b
......@@ -23,6 +23,13 @@ from tracker_data import TrackerData, RELEASES
from unsupported_packages import UnsupportedPackages, LimitedSupportPackages
def colored(x, *args, **kwargs):
return x
colored_on = False
if sys.stdout.isatty():
from termcolor import colored # noqa
......@@ -30,10 +37,7 @@ try:
except ImportError:
print("Note: you can install python3-termcolor for colored output",
colored_on = False
def colored(x, *args, **kwargs):
return x
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment