From 254ed38608c1115578956634f6ccf9ab3a15da53 Mon Sep 17 00:00:00 2001 From: Joakim Soderlund Date: Wed, 20 Mar 2019 18:04:50 +0100 Subject: [PATCH] Add argument default to ebook convert function --- fimfarchive/converters/fpub_epub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fimfarchive/converters/fpub_epub.py b/fimfarchive/converters/fpub_epub.py index d3a2bf4..3e78c85 100644 --- a/fimfarchive/converters/fpub_epub.py +++ b/fimfarchive/converters/fpub_epub.py @@ -51,7 +51,7 @@ ARGUMENTS = ('--no-default-epub-cover',) proc = partial(run, stderr=STDOUT, timeout=TIMEOUT, check=True) -def ebook_convert(data: bytes, pipe: int) -> bytes: +def ebook_convert(data: bytes, pipe: int = DEVNULL) -> bytes: """ Calls the external ebook-convert program. """ @@ -91,7 +91,7 @@ class FpubEpubConverter(Converter): with open(self.logdir / str(story.key), 'a') as fobj: data = ebook_convert(story.data, fobj.fileno()) else: - data = ebook_convert(story.data, DEVNULL) + data = ebook_convert(story.data) flavors = set(story.flavors) flavors.remove(DataFormat.FPUB)