It will avoid repeating the same message in different places. Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx> --- virtinst/cli.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/virtinst/cli.py b/virtinst/cli.py index 8a06e8b2..91f40f31 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -474,6 +474,16 @@ def get_domain_and_guest(conn, domstr): return (domain, inactive_xmlobj, active_xmlobj) +def fail_conflicting(option1, option2): + # translators: option1 and option2 are command line options, + # e.g. -a or --disk + msg = _("Cannot use %(option1)s and %(option2)s at the same time") % { + "option1": option1, + "option2": option2, + } + fail(msg) + + ########################### # bash completion helpers # ########################### -- 2.26.2