mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Get rid of a pointless use of pickle
This commit is contained in:
parent
7fcf90ba97
commit
54ef601e91
@ -6,7 +6,7 @@ __license__ = 'GPL v3'
|
|||||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||||
__docformat__ = 'restructuredtext en'
|
__docformat__ = 'restructuredtext en'
|
||||||
|
|
||||||
import cPickle, shutil
|
import shutil
|
||||||
|
|
||||||
from PyQt5.Qt import QAbstractListModel, Qt, QFont, QModelIndex, QDialog, QCoreApplication, QSize
|
from PyQt5.Qt import QAbstractListModel, Qt, QFont, QModelIndex, QDialog, QCoreApplication, QSize
|
||||||
|
|
||||||
@ -231,7 +231,7 @@ class Config(QDialog, Ui_Dialog):
|
|||||||
def recommendations(self):
|
def recommendations(self):
|
||||||
recs = [(k, v, OptionRecommendation.HIGH) for k, v in
|
recs = [(k, v, OptionRecommendation.HIGH) for k, v in
|
||||||
self._recommendations.items()]
|
self._recommendations.items()]
|
||||||
return cPickle.dumps(recs, -1)
|
return recs
|
||||||
|
|
||||||
def show_group_help(self, index):
|
def show_group_help(self, index):
|
||||||
widget = self._groups_model.widgets[index.row()]
|
widget = self._groups_model.widgets[index.row()]
|
||||||
|
@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
Logic for setting up conversion jobs
|
Logic for setting up conversion jobs
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import cPickle, os
|
import os
|
||||||
|
|
||||||
from PyQt5.Qt import QDialog, QProgressDialog, QTimer
|
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)') % \
|
desc = _('Convert book %(num)d of %(total)d (%(title)s)') % \
|
||||||
{'num':i + 1, 'total':total, 'title':dtitle}
|
{'num':i + 1, 'total':total, 'title':dtitle}
|
||||||
|
|
||||||
recs = cPickle.loads(d.recommendations)
|
recs = d.recommendations
|
||||||
if d.opf_file is not None:
|
if d.opf_file is not None:
|
||||||
recs.append(('read_metadata_from_opf', d.opf_file.name,
|
recs.append(('read_metadata_from_opf', d.opf_file.name,
|
||||||
OptionRecommendation.HIGH))
|
OptionRecommendation.HIGH))
|
||||||
@ -145,7 +145,7 @@ def convert_bulk_ebook(parent, queue, db, book_ids, out_format=None, args=[]):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
output_format = d.output_format
|
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)
|
book_ids = convert_existing(parent, db, book_ids, output_format)
|
||||||
use_saved_single_settings = d.opt_individual_saved_settings.isChecked()
|
use_saved_single_settings = d.opt_individual_saved_settings.isChecked()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user