Get rid of a pointless use of pickle

This commit is contained in:
Kovid Goyal 2019-03-14 20:46:20 +05:30
parent 7fcf90ba97
commit 54ef601e91
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ __license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import cPickle, shutil
import shutil
from PyQt5.Qt import QAbstractListModel, Qt, QFont, QModelIndex, QDialog, QCoreApplication, QSize
@ -231,7 +231,7 @@ class Config(QDialog, Ui_Dialog):
def recommendations(self):
recs = [(k, v, OptionRecommendation.HIGH) for k, v in
self._recommendations.items()]
return cPickle.dumps(recs, -1)
return recs
def show_group_help(self, index):
widget = self._groups_model.widgets[index.row()]

View File

@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
Logic for setting up conversion jobs
'''
import cPickle, os
import os
from PyQt5.Qt import QDialog, QProgressDialog, QTimer
@ -71,7 +71,7 @@ def convert_single_ebook(parent, db, book_ids, auto_conversion=False, # {{{
desc = _('Convert book %(num)d of %(total)d (%(title)s)') % \
{'num':i + 1, 'total':total, 'title':dtitle}
recs = cPickle.loads(d.recommendations)
recs = d.recommendations
if d.opf_file is not None:
recs.append(('read_metadata_from_opf', d.opf_file.name,
OptionRecommendation.HIGH))
@ -145,7 +145,7 @@ def convert_bulk_ebook(parent, queue, db, book_ids, out_format=None, args=[]):
return None
output_format = d.output_format
user_recs = cPickle.loads(d.recommendations)
user_recs = d.recommendations
book_ids = convert_existing(parent, db, book_ids, output_format)
use_saved_single_settings = d.opt_individual_saved_settings.isChecked()