[Git][security-tracker-team/security-tracker][master] 3 commits: lts-cve-triage: display lts' nodsa sub-state
Sylvain Beucler
beuc at debian.org
Tue Jul 2 10:14:44 BST 2019
Sylvain Beucler pushed to branch master at Debian Security Tracker / security-tracker
Commits:
2437a255 by Sylvain Beucler at 2019-07-02T09:12:08Z
lts-cve-triage: display lts' nodsa sub-state
- - - - -
b8b0b9b3 by Sylvain Beucler at 2019-07-02T09:12:08Z
lts-cve-triage: hint that color output is available
- - - - -
d9e8c731 by Sylvain Beucler at 2019-07-02T09:12:08Z
lts-cve-triage: fix formatting with no-colors output
- - - - -
1 changed file:
- bin/lts-cve-triage.py
Changes:
=====================================
bin/lts-cve-triage.py
=====================================
@@ -24,11 +24,14 @@ 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
+ colored_on = True
except ImportError:
+ print("Note: you can install python-termcolor for colored output")
pass
TRACKER_URL = 'https://security-tracker.debian.org/tracker/'
@@ -149,12 +152,15 @@ for key, desc in LIST_NAMES:
continue
print('\n{}:'.format(colored(desc, attrs=('bold',))))
for pkg in sorted(lists[key].keys()):
- print('\n* {:<35s} {}'.format(
+ formatstring = '\n* {:<18s} {}'
+ if colored_on:
+ formatstring = '\n* {:<35s} {}'
+ print(formatstring.format(
colored(pkg, 'red', attrs=('bold', 'underline')),
colored('{}source-package/{}'.format(TRACKER_URL, pkg), 'blue'),
))
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')))
+ print(' - {:<16s} {} {}'.format(x.name, colored(url, 'blue'), (key == 'unexpected_nodsa' and x.data['releases'][RELEASES['lts']]['nodsa_reason'] or '')))
print('')
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/c876fd2de82766361ea985990f9964084e9f3418...d9e8c731999bb4306696b76439c2a420d84b5254
--
View it on GitLab: https://salsa.debian.org/security-tracker-team/security-tracker/compare/c876fd2de82766361ea985990f9964084e9f3418...d9e8c731999bb4306696b76439c2a420d84b5254
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-security-tracker-commits/attachments/20190702/b84c5397/attachment-0001.html>
More information about the debian-security-tracker-commits
mailing list