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

Commit 56471b5

Browse files
committed
Don't invalidate os_variant if os_type value doesn't change.
1 parent 5e41f59 commit 56471b5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

virtinst/Guest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,14 @@ def set_os_type(self, val):
211211
if type(val) is not str:
212212
raise ValueError(_("OS type must be a string."))
213213
val = val.lower()
214+
214215
if self._OS_TYPES.has_key(val):
215-
self._os_type = val
216+
if self._os_type == val:
217+
# No change, don't invalidate variant
218+
return
219+
216220
# Invalidate variant, since it may not apply to the new os type
221+
self._os_type = val
217222
self._os_variant = None
218223
else:
219224
raise ValueError, _("OS type '%s' does not exist in our "

0 commit comments

Comments
 (0)