Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
4cf0e90e
Commit
4cf0e90e
authored
Aug 16, 2012
by
Clément Schreiner
Browse files
Partially complete the update.
parent
98210838
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/plugins/closedbugs.py
View file @
4cf0e90e
...
...
@@ -42,7 +42,7 @@ import logging
import
SOAPpy
from
debexpo.lib
import
constants
from
debexpo.plugins
import
BasePlugin
from
debexpo.plugins
.api
import
*
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -53,20 +53,12 @@ class ClosedbugTest(PluginResult):
Represents the result of the 'closed bugs' test.
"""
@
property
def
nb_closed
(
self
):
return
int
(
self
[
'nb_closed'
])
@
property
def
nb_errors
(
self
):
return
int
(
self
[
'nb_errors'
])
@
property
def
closes_wnpp
(
self
):
return
True
if
self
[
'wnpp'
]
==
'true'
else
False
nb_closed
=
int_field
(
'nb_closed'
)
nb_errors
=
int_field
(
'nb_errors'
)
closes_wnpp
=
bool_field
(
'wnpp'
)
def
__str__
(
self
):
if
self
.
closes_wnpp
(
self
)
:
if
self
.
closes_wnpp
:
return
'Package closes a WNPP bug'
strings
=
[]
...
...
@@ -85,17 +77,20 @@ class ClosedBug(PluginResult):
Represents a bug closed by the package.
"""
@
property
def
exists
(
self
):
return
True
if
self
[
'exists'
]
==
'true'
else
False
@
property
def
belongs
(
self
):
return
True
if
self
[
'belongs'
]
==
'true'
else
False
exists
=
bool_field
(
'exists'
)
belongs
=
bool_field
(
'exists'
)
number
=
int_field
(
'number'
)
def
__str__
(
self
):
return
'{number} ({severity}: {subject}'
.
format
(
self
[
if
self
.
exists
:
string
=
'{name} ({severity}: {subject}'
.
format
(
name
=
self
[
'name'
],
severity
=
self
.
severity
,
subject
=
self
[
'subject'
])
else
:
string
=
'Non-existent bug #{}'
.
format
(
self
.
number
)
return
string
class
ClosedBugsPlugin
(
QAPlugin
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment