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

Commit 19e89ae

Browse files
committed
Fix bug in cset 369 in util.get_max_vcpus. Was breaking virt-manager installs.
1 parent e59b1ac commit 19e89ae

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

virtinst/util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import random
2323
import os.path
2424
from sys import stderr
25+
26+
import libvirt
2527
from virtinst import _virtinst as _
2628

2729
def default_route():
@@ -195,6 +197,8 @@ def get_host_network_devices():
195197
def get_max_vcpus(conn, type=None):
196198
"""@conn libvirt connection to poll for max possible vcpus
197199
@type optional guest type (kvm, etc.)"""
200+
if type is None:
201+
type = conn.getType()
198202
try:
199203
max = conn.getMaxVcpus(type.lower())
200204
except libvirt.libvirtError:

0 commit comments

Comments
 (0)