[virt-tools-list] [virt-manager PATCH] gfxdetails: check settype in set_dev

Chen Hanxiao chenhanxiao at cn.fujitsu.com
Thu Jan 30 04:43:49 UTC 2014


From: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>

commit  64b2d0c6b7804f3501bfd8b657346776a8849879
forget to check settype and pylint complains this
as Unused variable.
This patch will fix this.

Signed-off-by: Chen Hanxiao <chenhanxiao at cn.fujitsu.com>
---
 virtManager/gfxdetails.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/virtManager/gfxdetails.py b/virtManager/gfxdetails.py
index 28ca332..2bc6c3a 100644
--- a/virtManager/gfxdetails.py
+++ b/virtManager/gfxdetails.py
@@ -199,7 +199,8 @@ class vmmGraphicsDetails(vmmGObjectUI):
         if is_other:
             settype = gfx.pretty_type_simple(gtype)
 
-        uiutil.set_combo_entry(self.widget("graphics-type"), gtype, 0)
+        if settype:
+            uiutil.set_combo_entry(self.widget("graphics-type"), gtype, 0)
         return title
 
 
-- 
1.8.2.1




More information about the virt-tools-list mailing list