mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04:00
Ensure result file is always written
This commit is contained in:
parent
bbb6ad3c32
commit
b54aff0383
@ -213,7 +213,8 @@ def main():
|
|||||||
notifier.start()
|
notifier.start()
|
||||||
|
|
||||||
result = func(*args, **kwargs)
|
result = func(*args, **kwargs)
|
||||||
if result is not None and os.path.exists(os.path.dirname(resultf)):
|
if result is not None:
|
||||||
|
os.makedirs(os.path.dirname(resultf), exist_ok=True)
|
||||||
with lopen(resultf, 'wb') as f:
|
with lopen(resultf, 'wb') as f:
|
||||||
f.write(pickle_dumps(result))
|
f.write(pickle_dumps(result))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user