8e527d3db7
virtman-fix-storage_capable.diff virtman-fix-ui-resize.diff virtman-fix-type.diff virtman-fix-addhw-nonhotplug.diff virtman-fix-no-nic-present.diff virtman-fix-ui-cleanup.diff OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=53
24 lines
808 B
Diff
24 lines
808 B
Diff
|
|
Subject: create: Fix building guest when no network options are present
|
|
From: Cole Robinson crobinso@redhat.com Thu Apr 7 17:11:10 2011 -0400
|
|
Date: Thu Apr 7 17:11:10 2011 -0400:
|
|
Git: 6da0a95b5754b6415df15b08d6d9fbd3dc07eb7d
|
|
|
|
|
|
Index: virt-manager-0.8.7/src/virtManager/create.py
|
|
===================================================================
|
|
--- virt-manager-0.8.7.orig/src/virtManager/create.py
|
|
+++ virt-manager-0.8.7/src/virtManager/create.py
|
|
@@ -1497,8 +1497,9 @@ class vmmCreate(vmmGObjectUI):
|
|
|
|
if self.nic and self.nic in self.guest.get_devices("interface"):
|
|
self.guest.remove_device(self.nic)
|
|
- self.nic = nic
|
|
- self.guest.add_device(self.nic)
|
|
+ if nic:
|
|
+ self.nic = nic
|
|
+ self.guest.add_device(self.nic)
|
|
|
|
return True
|
|
|