mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Add argument default to ebook convert function
This commit is contained in:
parent
2f173ecd29
commit
254ed38608
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ ARGUMENTS = ('--no-default-epub-cover',)
|
||||||
proc = partial(run, stderr=STDOUT, timeout=TIMEOUT, check=True)
|
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.
|
Calls the external ebook-convert program.
|
||||||
"""
|
"""
|
||||||
|
@ -91,7 +91,7 @@ class FpubEpubConverter(Converter):
|
||||||
with open(self.logdir / str(story.key), 'a') as fobj:
|
with open(self.logdir / str(story.key), 'a') as fobj:
|
||||||
data = ebook_convert(story.data, fobj.fileno())
|
data = ebook_convert(story.data, fobj.fileno())
|
||||||
else:
|
else:
|
||||||
data = ebook_convert(story.data, DEVNULL)
|
data = ebook_convert(story.data)
|
||||||
|
|
||||||
flavors = set(story.flavors)
|
flavors = set(story.flavors)
|
||||||
flavors.remove(DataFormat.FPUB)
|
flavors.remove(DataFormat.FPUB)
|
||||||
|
|
Loading…
Reference in a new issue