virtxml: Remove redundant listify calls

parse_option_strings always returns a list

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-08-03 10:44:04 -04:00
parent 4ca0d2c29b
commit d2b346370a

View File

@ -169,7 +169,6 @@ def action_add_device(guest, options, parserclass, devs):
guest.add_device(dev) guest.add_device(dev)
else: else:
devs = cli.parse_option_strings(options, guest, None) devs = cli.parse_option_strings(options, guest, None)
devs = xmlutil.listify(devs)
for dev in devs: for dev in devs:
dev.set_defaults(guest) dev.set_defaults(guest)
@ -213,7 +212,6 @@ def action_build_xml(conn, options, parserclass, guest):
inst = inst.__class__(conn) inst = inst.__class__(conn)
devs = cli.parse_option_strings(options, guest, inst) devs = cli.parse_option_strings(options, guest, inst)
devs = xmlutil.listify(devs)
for dev in devs: for dev in devs:
dev.set_defaults(guest) dev.set_defaults(guest)
return devs return devs