diff options
author | Cole Robinson <crobinso@redhat.com> | 2014-02-05 12:32:53 -0500 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2014-02-05 12:41:34 -0500 |
commit | e70ab961f9b06a3204926825916707c5850a51df (patch) | |
tree | d802e78dc3ac262702b00e19e2ae9039d87bb870 /virt-install | |
parent | 69015c048f3ce29fb5c5cccceffad7309aa20fc7 (diff) | |
download | virt-manager-e70ab961f9b06a3204926825916707c5850a51df.tar.gz |
virt-install: Switch back to using --sound argument
Since argparse allows optional arguments, we can back compat handle the
original boolean --sound option. This is nicer than using an option
named --soundhw
Diffstat (limited to 'virt-install')
-rwxr-xr-x | virt-install | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/virt-install b/virt-install index 297077cc..fe7ce6bd 100755 --- a/virt-install +++ b/virt-install @@ -114,11 +114,11 @@ def check_cdrom_option_error(options): ############################## def convert_old_sound(options): - if options.soundhw: + if not options.sound: return - if not options.old_sound_bool: - return - options.soundhw = "default" + for idx in range(len(options.sound)): + if options.sound[idx] is None: + options.sound[idx] = "default" def convert_old_init(options): @@ -871,11 +871,7 @@ def parse_args(): "console")) devg = parser.add_argument_group(_("Device Options")) - cli.add_device_options(devg) - - # Deprecated - devg.add_argument("--sound", action="store_true", dest="old_sound_bool", - default=False, help=argparse.SUPPRESS) + cli.add_device_options(devg, sound_back_compat=True) virg = parser.add_argument_group(_("Virtualization Platform Options")) virg.add_argument("-v", "--hvm", action="store_true", dest="fullvirt", |