mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-23 19:23:27 +02:00
Ensure result file is always written
This commit is contained in:
parent
bbb6ad3c32
commit
b54aff0383
1 changed files with 2 additions and 1 deletions
|
|
@ -213,7 +213,8 @@ def main():
|
|||
notifier.start()
|
||||
|
||||
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:
|
||||
f.write(pickle_dumps(result))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue