mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 21:18:04 +03:00
cli: add fail helper for 2 conflicting cli options
It will avoid repeating the same message in different places. Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
924d766112
commit
8501206cb3
@ -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 #
|
||||
###########################
|
||||
|
Loading…
Reference in New Issue
Block a user