提交 86ddc91f 编写于 作者: A Amador Pahim

yaml_to_mux: fix deprecation message

--filter-only/--filter-out are being deprecated by
--mux-filter-only/--mux-filter-out, but the deprecation
messages are pointing users to --mux-only/--mux-out, which
does not exist.

This patch fixes the deprecation messages, referencing the
correct new options.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 55d967ec
...@@ -277,10 +277,10 @@ class YamlToMux(CLI): ...@@ -277,10 +277,10 @@ class YamlToMux(CLI):
" multiplex (.yaml) FILE(s) (order dependent)") " multiplex (.yaml) FILE(s) (order dependent)")
mux.add_argument("--filter-only", nargs='*', default=[], mux.add_argument("--filter-only", nargs='*', default=[],
help="DEPRECATED: Filter only path(s) from " help="DEPRECATED: Filter only path(s) from "
"multiplexing (use --mux-only instead)") "multiplexing (use --mux-filter-only instead)")
mux.add_argument("--filter-out", nargs='*', default=[], mux.add_argument("--filter-out", nargs='*', default=[],
help="DEPRECATED: Filter out path(s) from " help="DEPRECATED: Filter out path(s) from "
"multiplexing (use --mux-out instead)") "multiplexing (use --mux-filter-out instead)")
@staticmethod @staticmethod
def _log_deprecation_msg(deprecated, current): def _log_deprecation_msg(deprecated, current):
...@@ -294,7 +294,7 @@ class YamlToMux(CLI): ...@@ -294,7 +294,7 @@ class YamlToMux(CLI):
# Deprecated filters # Deprecated filters
only = getattr(args, "filter_only", None) only = getattr(args, "filter_only", None)
if only: if only:
self._log_deprecation_msg("--filter-only", "--mux-only") self._log_deprecation_msg("--filter-only", "--mux-filter-only")
mux_filter_only = getattr(args, "mux_filter_only") mux_filter_only = getattr(args, "mux_filter_only")
if mux_filter_only: if mux_filter_only:
args.mux_filter_only = mux_filter_only + only args.mux_filter_only = mux_filter_only + only
...@@ -302,7 +302,7 @@ class YamlToMux(CLI): ...@@ -302,7 +302,7 @@ class YamlToMux(CLI):
args.mux_filter_only = only args.mux_filter_only = only
out = getattr(args, "filter_out", None) out = getattr(args, "filter_out", None)
if out: if out:
self._log_deprecation_msg("--filter-out", "--mux-out") self._log_deprecation_msg("--filter-out", "--mux-filter-out")
mux_filter_out = getattr(args, "mux_filter_out") mux_filter_out = getattr(args, "mux_filter_out")
if mux_filter_out: if mux_filter_out:
args.mux_filter_out = mux_filter_out + out args.mux_filter_out = mux_filter_out + out
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册