Commit d25c095b authored by Clément Schreiner's avatar Clément Schreiner
Browse files

Further updates to the plugin.

Should be okay once the template has been updated too.
parent c2ac6866
......@@ -80,6 +80,7 @@ class ClosedBug(PluginResult):
exists = bool_field('exists')
belongs = bool_field('exists')
number = int_field('number')
is_error = bool_field('is_error')
def __str__(self):
if self.exists:
......@@ -146,18 +147,19 @@ class ClosedBugsPlugin(QAPlugin):
nb_closed = 0
nb_errors = 0
wnpp = 'false'
wnpp = False
for bug in bugs:
bug_result = self.new_result(ClosedBug, number=bug)
if not bug in raw_bugs:
bug_result['exists'] = 'false'
bug_result['belongs'] = 'false'
bug_result.exists = False
bug_result.belongs = False
bug_result.is_error = False
severity = max(severity, constants.PLUGIN_SEVERITY_ERROR)
nb_errors += 1
continue
bug_result['exists'] = 'true'
bug_result.exists = True
package = raw_bugs[bug]['package']
bug_result['name'] = package
......@@ -165,18 +167,18 @@ class ClosedBugsPlugin(QAPlugin):
bug_result['severity'] = raw_bugs[bug]['severity']
source = raw_bugs['source'].split(', ')
bug_result['belongs'] = 'true'
bug_result.belongs = True
if name == 'wnpp':
bug_result['wnpp'] = 'true'
wnpp = 'true'
bug_result.wnpp = True
wnpp = True
nb_closed += 1
elif self.changes['Source'] in source:
nb_closed += 1
else:
bug_result['belongs'] = 'false'
bug_result.belongs = False
nb_errors += 1
severity = max(severity, constants.PLUGIN_SEVERITY_ERROR)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment