Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 68c64b6

Browse files
committed
virt-install: Fix chardev variable naming to match VirtualCharDevice
1 parent 10fce54 commit 68c64b6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

virt-install

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,13 @@ def parse_boot_option(guest, optstring):
173173
raise ValueError(_("Unknown options %s") % opts.keys())
174174

175175

176-
def parse_char_option(guest, char_type, optstring):
176+
def parse_char_option(guest, dev_type, optstring):
177177
"""
178178
Helper to parse --serial/--parallel options
179179
"""
180180
# Peel the char type off the front
181-
dev_type, opts = cli.parse_optstr(optstring, remove_first=True)
182-
dev = VirtualCharDevice.get_dev_instance(guest.conn, char_type, dev_type)
181+
char_type, opts = cli.parse_optstr(optstring, remove_first=True)
182+
dev = VirtualCharDevice.get_dev_instance(guest.conn, dev_type, char_type)
183183

184184
def set_param(paramname, dictname, val=None):
185185
val = cli.get_opt_param(opts, dictname, val)
@@ -189,7 +189,7 @@ def parse_char_option(guest, char_type, optstring):
189189
if not dev.supports_property(paramname):
190190
raise ValueError(_("%(chartype)s type %(devtype)s does not "
191191
"support '%(optname)s' option.") %
192-
{"chartype" : char_type, "devtype": dev_type,
192+
{"devtype" : dev_type, "chartype": char_type,
193193
"optname" : dictname} )
194194
setattr(dev, paramname, val)
195195

0 commit comments

Comments
 (0)