From acbd785af90eaac58432bceae8e9fb9171b8d5c1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 2 Jul 2013 09:24:09 +0530 Subject: [PATCH] Fix docstring of is_image_collection --- src/calibre/customize/conversion.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/calibre/customize/conversion.py b/src/calibre/customize/conversion.py index fe0d563206..38ffcef71f 100644 --- a/src/calibre/customize/conversion.py +++ b/src/calibre/customize/conversion.py @@ -77,7 +77,7 @@ class OptionRecommendation(object): self.option.choices: raise ValueError('OpRec: %s: Recommended value not in choices'% self.option.name) - if not (isinstance(self.recommended_value, (int, float, str, unicode))\ + if not (isinstance(self.recommended_value, (int, float, str, unicode)) or self.recommended_value is None): raise ValueError('OpRec: %s:'%self.option.name + repr(self.recommended_value) + @@ -139,8 +139,10 @@ class InputFormatPlugin(Plugin): file_types = set([]) #: If True, this input plugin generates a collection of images, - #: one per HTML file. You can obtain access to the images via - #: convenience method, :meth:`get_image_collection`. + #: one per HTML file. This can be set dynamically, in the convert method + #: if the input files can be both image collections and non-image collections. + #: If you set this to True, you must implement the get_images() method that returns + #: a list of images. is_image_collection = False #: Number of CPU cores used by this plugin @@ -238,7 +240,6 @@ class InputFormatPlugin(Plugin): ret = self.convert(stream, options, file_ext, log, accelerators) - return ret def postprocess_book(self, oeb, opts, log): @@ -313,7 +314,6 @@ class OutputFormatPlugin(Plugin): Plugin.__init__(self, *args) self.report_progress = DummyReporter() - def convert(self, oeb_book, output, input_plugin, opts, log): ''' Render the contents of `oeb_book` (which is an instance of @@ -363,3 +363,4 @@ class OutputFormatPlugin(Plugin): +