1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

parse_debbug(): parse and fetch multiple bugs

This commit is contained in:
urlbot
2015-06-09 14:56:29 +02:00
parent c6e46a9268
commit 5ab0d2319f

View File

@@ -69,19 +69,22 @@ def parse_debbug(**args):
if not bugs:
return None
url = 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s' % bugs[0]
out = []
for b in bugs:
logger('plugin', 'detected Debian bug #%s' % b)
url = 'https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%s' % b
status, title = extract_title(url)
if 0 == status:
title = 'Debian Bug: %s: %s' % (title, url)
out.append('Debian Bug: %s: %s' % (title, url))
elif 3 == status:
pass
out.append('error for #%s: %s' % (b, title))
else:
return None
logger('plugin', 'parse_debbug(): unknown status %d' % status)
logger('plugin', 'detected Debian bug')
return {
'msg': title
'msg': out
}
@pluginfunction('cve', 'parse a CVE handle', ptypes_PARSE, ratelimit_class = RATE_NO_SILENCE | RATE_GLOBAL)