Don't crash if .gtk-bookmarks doesn't exist yet

This commit is contained in:
Michael Webster 2013-05-20 17:58:02 -04:00
parent 7727fa6e8a
commit daed7b863b

View File

@ -225,7 +225,9 @@ class pluginclass( object ):
def do_gtk_bookmarks( self ): def do_gtk_bookmarks( self ):
if self.showGTKBookmarks: if self.showGTKBookmarks:
bookmarks = {} if not os.path.exists(os.path.expanduser('~/.gtk-bookmarks')):
return
bookmarks = {}
with open(os.path.expanduser('~/.gtk-bookmarks'), 'r') as f: with open(os.path.expanduser('~/.gtk-bookmarks'), 'r') as f:
for line in f: for line in f:
#line = line.replace('file://', '') #line = line.replace('file://', '')