From 4913673e8fe4f394b48926252402b66c95a7a1fd Mon Sep 17 00:00:00 2001 From: Thore Schillmann Date: Thu, 7 Jul 2022 11:47:10 +0000 Subject: [PATCH] added `subprocess.wait()` when getting metadata --- cps/tasks/convert.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py index 25cf562d..79d7ddbd 100644 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -241,6 +241,7 @@ class TaskConvert(CalibreTask): calibredb_binarypath = os.path.join(config.config_binariesdir, SUPPORTED_CALIBRE_BINARIES["calibredb"]) opf_command = [calibredb_binarypath, 'show_metadata', '--as-opf', str(book_id), '--with-library', config.config_calibre_dir] p = process_open(opf_command, quotes) + p.wait() path_tmp_opf = os.path.join(tmp_dir, "metadata_" + str(current_milli_time()) + ".opf") with open(path_tmp_opf, 'w') as fd: copyfileobj(p.stdout, fd)