[virt-tools-list] [PATCH] Fix some problems in the create window

Giuseppe Scrivano gscrivan at redhat.com
Wed Oct 2 13:28:02 UTC 2013


These two errors are fixed:

Traceback (most recent call last):
  File "virt-manager/virtManager/create.py", line 335, in reset_state
    self.set_conn(activeconn, force_validate=True)
  File "virt-manager/virtManager/create.py", line 201, in set_conn
    self.set_conn_state()
  File "virt-manager/virtManager/create.py", line 425, in set_conn_state
    self.widget("config-machines").get_visible())
AttributeError: 'NoneType' object has no attribute 'get_visible'

Traceback (most recent call last):
  File "virt-manager/virtManager/create.py", line 335, in reset_state
    self.set_conn(activeconn, force_validate=True)
  File "virt-manager/virtManager/create.py", line 201, in set_conn
    self.set_conn_state()
  File "virt-manager/virtManager/create.py", line 587, in set_conn_state
    self.conn.netdev_error, True)
  File "virt-manager/virtManager/create.py", line 604, in set_net_warn
    net_warn_icon.set_visible(show_warn)
  File "/usr/lib/python2.7/site-packages/gi/types.py", line 113, in function
    return info.invoke(*args, **kwargs)
TypeError: Argument 1 does not allow None as a value

Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
---
 virtManager/create.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/virtManager/create.py b/virtManager/create.py
index 423d7b5..c199466 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
@@ -422,7 +422,7 @@ class vmmCreate(vmmGObjectUI):
 
         show_arch = (self.widget("config-hv").get_visible() or
                      self.widget("config-arch").get_visible() or
-                     self.widget("config-machines").get_visible())
+                     self.widget("config-machine").get_visible())
         uihelpers.set_grid_row_visible(self.widget("arch-expander"), show_arch)
 
         if self.conn.is_xen():
@@ -601,7 +601,7 @@ class vmmCreate(vmmGObjectUI):
             net_expander.set_expanded(True)
 
         if do_tooltip:
-            net_warn_icon.set_visible(show_warn)
+            net_warn_icon.set_visible(bool(show_warn))
             if msg:
                 net_warn_icon.set_tooltip_text(show_warn and msg or "")
         else:
-- 
1.8.3.1




More information about the virt-tools-list mailing list