diff options
author | Chris Lamb <lamby@debian.org> | 2019-08-05 09:40:34 +0100 |
---|---|---|
committer | Chris Lamb <lamby@debian.org> | 2019-08-05 09:40:34 +0100 |
commit | 22a5da5866b0ad4c680d00538b3db3cf729e5e7a (patch) | |
tree | a62c5e44f8820ec3fb19e3018469fef9aa3f6f3f /bin | |
parent | 28db1e4b6a682304f298aa969d8cfec78968366a (diff) |
bin/lts-cve-triage.py: Correct undefined reference to `colored` when stdout is not a TTY
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/lts-cve-triage.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/lts-cve-triage.py b/bin/lts-cve-triage.py index f18d345ea2..9cb6306983 100755 --- a/bin/lts-cve-triage.py +++ b/bin/lts-cve-triage.py @@ -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 + + try: 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", file=sys.stderr) - colored_on = False - def colored(x, *args, **kwargs): - return x TRACKER_URL = 'https://security-tracker.debian.org/tracker/' |