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
5afa8085
Commit
5afa8085
authored
Feb 13, 2012
by
Nicolas Dandrimont
🤔
Browse files
Remove outcomes from the plugins
The 'outcome' database field contains the long description of the plugin output.
parent
1aa1e28a
Changes
2
Hide whitespace changes
Inline
Side-by-side
debexpo/lib/plugins.py
View file @
5afa8085
...
@@ -203,8 +203,7 @@ class Plugins(object):
...
@@ -203,8 +203,7 @@ class Plugins(object):
# The 'plugin' object points to the class containing the actual plugin/test
# The 'plugin' object points to the class containing the actual plugin/test
if
hasattr
(
module
,
'plugin'
):
if
hasattr
(
module
,
'plugin'
):
p
=
getattr
(
module
,
'plugin'
)(
name
=
plugin
,
changes
=
self
.
changes
,
\
p
=
getattr
(
module
,
'plugin'
)(
name
=
plugin
,
changes
=
self
.
changes
,
\
changes_file
=
self
.
changes_file
,
tempdir
=
self
.
tempdir
,
\
changes_file
=
self
.
changes_file
,
tempdir
=
self
.
tempdir
)
outcomes
=
getattr
(
module
,
'outcomes'
))
for
item
in
self
.
kw
:
for
item
in
self
.
kw
:
setattr
(
p
,
item
,
self
.
kw
[
item
])
setattr
(
p
,
item
,
self
.
kw
[
item
])
...
...
debexpo/plugins/__init__.py
View file @
5afa8085
...
@@ -77,8 +77,6 @@ class BasePlugin(object):
...
@@ -77,8 +77,6 @@ class BasePlugin(object):
``severity``
``severity``
Severity of the result.
Severity of the result.
"""
"""
if
data
is
None
:
data
=
self
.
outcomes
.
get
(
outcome
)[
'name'
]
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
data
=
data
,
severity
=
severity
))
data
=
data
,
severity
=
severity
))
...
@@ -96,8 +94,6 @@ class BasePlugin(object):
...
@@ -96,8 +94,6 @@ class BasePlugin(object):
Severity of the result.
Severity of the result.
"""
"""
if
data
is
None
:
data
=
self
.
outcomes
.
get
(
outcome
)[
'name'
]
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
data
=
data
,
severity
=
severity
))
data
=
data
,
severity
=
severity
))
...
@@ -111,12 +107,6 @@ class BasePlugin(object):
...
@@ -111,12 +107,6 @@ class BasePlugin(object):
``data``
``data``
Resulting data from the plugin, like more detail about the process.
Resulting data from the plugin, like more detail about the process.
"""
"""
if
data
is
None
:
try
:
data
=
self
.
outcomes
.
get
(
outcome
)[
'name'
]
except
TypeError
:
data
=
self
.
outcomes
.
get
(
outcome
)
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
self
.
result
.
append
(
PluginResult
(
from_plugin
=
self
.
name
,
outcome
=
outcome
,
data
=
data
,
severity
=
constants
.
PLUGIN_SEVERITY_INFO
))
data
=
data
,
severity
=
constants
.
PLUGIN_SEVERITY_INFO
))
...
...
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