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
a33bfcf9
Commit
a33bfcf9
authored
Aug 16, 2012
by
Clément Schreiner
Browse files
Update the 'distribution' plugin to the new API.
parent
09a0e00d
Changes
2
Hide whitespace changes
Inline
Side-by-side
debexpo/plugins/distribution.py
View file @
a33bfcf9
...
...
@@ -41,7 +41,17 @@ import logging
import
os
from
debexpo.lib
import
constants
from
debexpo.plugins
import
BasePlugin
from
debexpo.plugins.api
import
*
@
test_result
class
DistributionTest
(
PluginResult
):
is_unreleased
=
bool_field
(
'unreleased'
)
def
__str__
(
self
):
if
is_unreleased
:
return
'Package uploaded for the unreleased distribution'
else
:
return
None
class
DistributionPlugin
(
BasePlugin
):
...
...
@@ -50,14 +60,14 @@ class DistributionPlugin(BasePlugin):
Checks whether the package is for the UNRELEASED distribution
"""
data
=
{
"is-unreleased"
:
False
,
}
distribution
=
self
.
changes
[
"Distribution"
]
if
distribution
.
lower
()
==
"unreleased"
:
data
[
"is-unreleased"
]
=
True
self
.
failed
(
"Package uploaded for the unreleased distribution"
,
data
,
constants
.
PLUGIN_SEVERITY_ERROR
)
self
.
new_test_result
(
is_unreleased
=
True
,
severity
=
constants
.
PLUGIN_SEVERITY_ERROR
)
plugin
=
DistributionPlugin
models
=
[
DistributionTest
]
debexpo/templates/plugins/distribution/html.mako
View file @
a33bfcf9
<div class="qa-header">
${
o.outcome
}
${
test_result
}
</div>
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