mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
VirtualDisk: Drop is_parse conditional if changing device
We can easily push this up to the caller, nothing really changes the device of an existing device in practice.
This commit is contained in:
parent
d3dbbe9f54
commit
6506fb2995
@ -271,8 +271,8 @@ class XMLParseTest(unittest.TestCase):
|
||||
check("path", "/dev/loop0", None)
|
||||
check("device", "cdrom", "floppy")
|
||||
check("read_only", True, False)
|
||||
check("target", None, "fde")
|
||||
check("bus", None, "fdc")
|
||||
check("target", "hdc", "fde")
|
||||
check("bus", "ide", "fdc")
|
||||
check("error_policy", "stop", None)
|
||||
|
||||
check = self._make_checker(disk6)
|
||||
|
@ -449,12 +449,6 @@ class VirtualDisk(VirtualDevice):
|
||||
def get_device(self):
|
||||
return self._device
|
||||
def set_device(self, val):
|
||||
if val == self._device:
|
||||
return
|
||||
|
||||
if self._is_parse():
|
||||
self.bus = None
|
||||
self.target = None
|
||||
self._device = val
|
||||
device = XMLProperty(get_device, set_device,
|
||||
xpath="./@device")
|
||||
|
Loading…
Reference in New Issue
Block a user