提交 f9eda4c4 编写于 作者: C Cleber Rosa

Variants: remove the presentation of the default variant

The concept of a "default variant" was not particular the intention,
but rather the side effect of the implementation.  To make things
clearer, let's not present any variant if none was actively created by
any plugin implementation.

Further work will change the internals to completely remove its
existence.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e0f92cc5
......@@ -265,15 +265,7 @@ class Varianter:
:rtype: str
"""
if self._no_variants == 0: # No variants, only defaults:
out = []
if summary:
out.append("No variants available, using defaults only")
if variants:
variant = next(self.itertests())
variant["variant_id"] = "" # Don't confuse people with None
out.append("\n".join(variant_to_str(variant, variants - 1,
kwargs, self.debug)))
return "\n\n".join(out)
return ""
out = [item for item in self._variant_plugins.map_method_with_return("to_str",
summary,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册