[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[virt-tools-list] [PATCH] exclude cdrom from vm inspection



Hello,

Proposed patch for BZ#752552
(https://bugzilla.redhat.com/show_bug.cgi?id=752552)

Description of problem:
the new feature vm inspection fails when a cdrom is attached to the VM.

Best regards,
Lars
From b31a14940e81643b129cfe288feceb1196ed852d Mon Sep 17 00:00:00 2001
From: Lars Sjostrom <lars radicore se>
Date: Wed, 9 Nov 2011 21:05:49 +0100
Subject: [PATCH] exclude cdrom from vm inspection

---
 src/virtManager/inspection.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/virtManager/inspection.py b/src/virtManager/inspection.py
index 7723c57..0365b52 100644
--- a/src/virtManager/inspection.py
+++ b/src/virtManager/inspection.py
@@ -140,7 +140,8 @@ class vmmInspection(vmmGObject):
         disks = []
         for disk in vm.get_disk_devices():
             if (disk.path and
-                (disk.type == "block" or disk.type == "file")):
+                (disk.type == "block" or disk.type == "file") and
+                not disk.device == "cdrom"):
                 disks.append(disk)
 
         if not disks:
-- 
1.7.7


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]