def load_link_list(self):
try:
input = open('link_list.dat', 'rb')
data = cPickle.load(input)
disc, bkmark = data
except IOError:
log.msg("No link_list.dat found.")
except ValueError:
log.msg("File link_list.dat incomplete.")
except cPickle.UnpicklingError:
log.msg("File link_list.dat bad or corrupt.")
else:
for key, value in disc.iteritems():
self.add_link_list(value, key)
for key, value in bkmark.iteritems():
self.add_bookmark(key)
评论列表
文章目录