summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorChris Lamb <lamby@debian.org>2019-08-05 09:24:06 +0100
committerChris Lamb <lamby@debian.org>2019-08-05 09:25:43 +0100
commit28db1e4b6a682304f298aa969d8cfec78968366a (patch)
tree4f2e4ce123b15aca572d25a881135e250a9773ba /bin
parent76f08cc1df242e3e035326c59826c2d4b2d2bc0e (diff)
bin/lts-cve-triage.py: Fix flake8 (3.7.8-3) warnings
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lts-cve-triage.py47
1 files changed, 27 insertions, 20 deletions
diff --git a/bin/lts-cve-triage.py b/bin/lts-cve-triage.py
index f260c94bcd..f18d345ea2 100755
--- a/bin/lts-cve-triage.py
+++ b/bin/lts-cve-triage.py
@@ -22,17 +22,18 @@ import collections
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
+ from termcolor import colored # noqa
colored_on = True
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/'
@@ -42,28 +43,27 @@ LIST_NAMES = (
('triage_limited_support',
'Issues on packages with limited support (review support rules)'),
('triage_already_in_dsa_needed',
- ('Issues to triage for {lts} that are already in dsa-needed'
- ).format(**RELEASES)),
+ ('Issues to triage for {lts} that are already in dsa-needed')
+ .format(**RELEASES)),
('triage_likely_nodsa',
- ('Issues to triage for {lts} that are no-dsa in {next_lts}'
- ).format(**RELEASES)),
+ ('Issues to triage for {lts} that are no-dsa in {next_lts}')
+ .format(**RELEASES)),
('triage_possible_easy_fixes',
- ('Issues not yet triaged for {lts}, but already fixed in {next_lts}'
- ).format(**RELEASES)),
+ ('Issues not yet triaged for {lts}, but already fixed in {next_lts}')
+ .format(**RELEASES)),
('triage_other_not_triaged_in_next_lts',
- ('Other issues to triage for {lts} (not yet triaged for {next_lts})'
- ).format(**RELEASES)),
+ ('Other issues to triage for {lts} (not yet triaged for {next_lts})')
+ .format(**RELEASES)),
('triage_other',
'Other issues to triage (no special status)'),
('unexpected_nodsa',
- ('Issues tagged no-dsa in {lts} that are open in {next_lts}'
- ).format(**RELEASES)),
+ ('Issues tagged no-dsa in {lts} that are open in {next_lts}')
+ .format(**RELEASES)),
('possible_easy_fixes',
- ('Issues from dla-needed.txt that are already fixed in {next_lts}'
- ).format(**RELEASES)),
+ ('Issues from dla-needed.txt that are already fixed in {next_lts}')
+ .format(**RELEASES)),
('undetermined',
- ('Undetermined issues in {lts}'
- ).format(**RELEASES)),
+ ('Undetermined issues in {lts}').format(**RELEASES)),
)
lists = collections.defaultdict(lambda: collections.defaultdict(lambda: []))
@@ -81,7 +81,8 @@ parser.add_argument('--exclude', nargs='+', choices=[x[0] for x in LIST_NAMES],
args = parser.parse_args()
tracker = TrackerData(update_cache=not args.skip_cache_update)
-unsupported = UnsupportedPackages(debian_version=8, update_cache=not args.skip_cache_update)
+unsupported = UnsupportedPackages(debian_version=8,
+ update_cache=not args.skip_cache_update)
limited = LimitedSupportPackages(update_cache=not args.skip_cache_update)
@@ -161,6 +162,12 @@ for key, desc in LIST_NAMES:
))
for x in sorted(lists[key][pkg], key=lambda x: x.name):
url = '{}{}'.format(TRACKER_URL, x.name)
- print(' - {:<16s} {} {}'.format(x.name, colored(url, 'blue'), (key == 'unexpected_nodsa' and x.data['releases'][RELEASES['lts']]['nodsa_reason'] or '')))
+ print(' - {:<16s} {} {}'.format(
+ x.name,
+ colored(url, 'blue'),
+ (key == 'unexpected_nodsa' and
+ x.data['releases'][RELEASES['lts']]['nodsa_reason']
+ or '')),
+ )
print('')

© 2014-2024 Faster IT GmbH | imprint | privacy policy