From cb52df1c320463674938462a68e0a3be4279473b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 22 May 2023 10:19:42 +0300 Subject: Make directory at "path" and all intermediate ones. Make the directory at the given path, and any intermediate ones to avoid errors in the indexing code when the directory, or its parent(s) do not exist. --- scripts/index-genenetwork | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/index-genenetwork') diff --git a/scripts/index-genenetwork b/scripts/index-genenetwork index 401ae1a..4da82e4 100755 --- a/scripts/index-genenetwork +++ b/scripts/index-genenetwork @@ -131,6 +131,8 @@ def locked_xapian_writable_database(path: pathlib.Path) -> xapian.WritableDataba between processes. """ # pylint: disable-next=invalid-name + if not path.exists(): + os.makedirs(path) db = xapian.WritableDatabase(str(path)) db.begin_transaction() try: -- cgit v1.2.3