Changeset e442b8821e135b7e4a656ed1ccff664c98b39aef

Show
Ignore:
Timestamp:
06/05/07 09:57:20 (6 years ago)
Author:
iacopo <iacopo@…>
Children:
419963371a32e1ff6c61b365ec83c88b4bfd3b4b
Parents:
b636126e39ebd09e40e2349c3c5948b9f9c36284
git-committer:
iacopo <iacopo@…> (06/05/07 09:57:20)
Message:

Try/except add to browser section

git-svn-id:  https://labs.truelite.it/svn/octofuss/trunk@379 5a101938-5c21-0410-9b5a-a83d6f3706a9

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lib/octofuss/ui.py

    r157dcb1 re442b88  
    2828 
    2929         
    30 import webbrowser 
    31  
    32  
    33          
    3430class OctoSplash(gtk.Window): 
    3531        def __init__(self): 
     
    164160                 
    165161        def open_url(self,url): 
    166                 return webbrowser.open(url) 
     162                try: 
     163                        import webbrowser 
     164                        webbrowser.open(url) 
     165                except Exception, e: 
     166                        self.__error_dialog("Problem opening the web browser:\n"+str(e)) 
     167 
    167168                 
    168169        def add_tab(self,object): 
     
    177178                                tab = self.notebook.get_nth_page(i) 
    178179                                label = self.notebook.get_tab_label(tab).get_text() 
     180                                from octofuss.cluster import HostWindow 
     181 
    179182                                if label == tabName: 
    180183                                        current = False 
     
    182185                                                current = True 
    183186                                        self.notebook.remove_page(i) 
    184                                         from octofuss.cluster import HostWindow 
    185187                                self.add_tab(HostWindow()) 
    186188                                tab_number = self.notebook.get_n_pages()