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:
15
plugins.py
15
plugins.py
@@ -69,19 +69,22 @@ def parse_debbug(**args):
|
|||||||
if not bugs:
|
if not bugs:
|
||||||
return None
|
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)
|
status, title = extract_title(url)
|
||||||
|
|
||||||
if 0 == status:
|
if 0 == status:
|
||||||
title = 'Debian Bug: %s: %s' % (title, url)
|
out.append('Debian Bug: %s: %s' % (title, url))
|
||||||
elif 3 == status:
|
elif 3 == status:
|
||||||
pass
|
out.append('error for #%s: %s' % (b, title))
|
||||||
else:
|
else:
|
||||||
return None
|
logger('plugin', 'parse_debbug(): unknown status %d' % status)
|
||||||
|
|
||||||
logger('plugin', 'detected Debian bug')
|
|
||||||
return {
|
return {
|
||||||
'msg': title
|
'msg': out
|
||||||
}
|
}
|
||||||
|
|
||||||
@pluginfunction('cve', 'parse a CVE handle', ptypes_PARSE, ratelimit_class = RATE_NO_SILENCE | RATE_GLOBAL)
|
@pluginfunction('cve', 'parse a CVE handle', ptypes_PARSE, ratelimit_class = RATE_NO_SILENCE | RATE_GLOBAL)
|
||||||
|
|||||||
Reference in New Issue
Block a user