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,6 +225,8 @@ class pluginclass( object ):
def do_gtk_bookmarks( self ): def do_gtk_bookmarks( self ):
if self.showGTKBookmarks: if self.showGTKBookmarks:
if not os.path.exists(os.path.expanduser('~/.gtk-bookmarks')):
return
bookmarks = {} 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: