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

Commit 10fce54

Browse files
committed
virt-install: Error for invalid option --console virtio
1 parent 0dfd637 commit 10fce54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

virtinst/VirtualCharDevice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,6 @@ def get_dev_instance(conn, dev_type, char_type):
124124
# allow an API user to just use hasattr(obj, paramname) to see
125125
# what parameters apply, instead of having to hardcode all that
126126
# information.
127-
if dev_type == VirtualCharDevice.DEV_CONSOLE:
128-
return VirtualConsoleDevice(conn)
129-
130127
if char_type == VirtualCharDevice.CHAR_PTY:
131128
c = VirtualCharPtyDevice
132129
elif char_type == VirtualCharDevice.CHAR_STDIO:
@@ -151,6 +148,9 @@ def get_dev_instance(conn, dev_type, char_type):
151148
raise ValueError(_("Unknown character device type '%s'.") %
152149
char_type)
153150

151+
if dev_type == VirtualCharDevice.DEV_CONSOLE:
152+
return VirtualConsoleDevice(conn)
153+
154154
return c(conn, dev_type)
155155
get_dev_instance = staticmethod(get_dev_instance)
156156

0 commit comments

Comments
 (0)