Changeset 4210

Show
Ignore:
Timestamp:
02/27/09 18:58:49 (4 years ago)
Author:
gpolo
Message:

Fixed ticket #199: "Umit may hang while staring".

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/umitGUI/App.py

    r4181 r4210  
    5454 
    5555    def __create_show_main_window(self): 
    56         if option_parser.get_inventory(): 
    57             from umitInventory.Viewer import InventoryViewer 
    58             self.main_window = InventoryViewer() 
    59         else: 
    60             from umitGUI.MainWindow import MainWindow 
    61             self.main_window = MainWindow() 
    62          
     56        try: 
     57            if option_parser.get_inventory(): 
     58                from umitInventory.Viewer import InventoryViewer 
     59                self.main_window = InventoryViewer() 
     60            else: 
     61                from umitGUI.MainWindow import MainWindow 
     62                self.main_window = MainWindow() 
     63        except Exception: 
     64            # If any exception happens at this point we need to stop gtk 
     65            # so Umit doesn't hang. 
     66            import gtk 
     67            gtk.main_quit() 
     68            raise 
     69 
    6370        if is_maemo(): 
    6471            import hildon