Changeset 5522

Show
Ignore:
Timestamp:
02/09/10 22:38:00 (6 months ago)
Author:
ignotus
Message:

Solve the problem described by #373.
The problem happens when the user is able to open hostview when there is no
scan info.
For example, try the scan "nmap -V" and then go to Topology and open hostview.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/umit/gui/radialnet/HostsViewer.py

    r4938 r5522  
    6464 
    6565        self.__panel.add1(self.__list) 
    66         self.__panel.add2(self.__view) 
     66 
     67        if self.__view: 
     68            self.__panel.add2(self.__view) 
     69 
    6770        self.__panel.set_position(int(DIMENSION[0] / 5)) 
    6871 
     
    165168        """ 
    166169        path = widget.get_cursor()[0] 
    167         iter = self.__hosts_store.get_iter(path) 
    168  
    169         node = self.__nodes[self.__hosts_store.get_value(iter, 0)] 
    170  
    171         self.__parent.change_notebook(node) 
     170 
     171        if path: 
     172            iter = self.__hosts_store.get_iter(path) 
     173            node = self.__nodes[self.__hosts_store.get_value(iter, 0)] 
     174            self.__parent.change_notebook(node) 
    172175 
    173176