check for bookmark first
This commit is contained in:
parent
7e748a1306
commit
cd74538adf
@ -108,12 +108,13 @@ class BookmarkManager:
|
|||||||
else:
|
else:
|
||||||
path = os.path.join(common.CONFIG_DIR, "mozilla", "bookmarks.save")
|
path = os.path.join(common.CONFIG_DIR, "mozilla", "bookmarks.save")
|
||||||
|
|
||||||
try:
|
if os.path.exists(path):
|
||||||
bookmark_file = open(path, "rb")
|
try:
|
||||||
bookmarks = cPickle.load(bookmark_file)
|
bookmark_file = open(path, "rb")
|
||||||
bookmark_file.close()
|
bookmarks = cPickle.load(bookmark_file)
|
||||||
except Exception, e:
|
bookmark_file.close()
|
||||||
print "Unable to load bookmarks file: %s", e
|
except Exception, e:
|
||||||
|
print "Unable to load bookmarks file: %s", e
|
||||||
|
|
||||||
if bookmarks == None:
|
if bookmarks == None:
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user