From 0609799a4ca663a17aebb1526ae99589b1c291f7 Mon Sep 17 00:00:00 2001 From: wuzewu Date: Tue, 4 Feb 2020 17:23:22 +0800 Subject: [PATCH] Create cache directory automaticly --- paddlehub/common/dir.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddlehub/common/dir.py b/paddlehub/common/dir.py index 2c7601df..0a2d970d 100644 --- a/paddlehub/common/dir.py +++ b/paddlehub/common/dir.py @@ -45,6 +45,9 @@ TMP_HOME = os.path.join(gen_hub_home(), "tmp") if not os.path.exists(TMP_HOME): os.makedirs(TMP_HOME) +if not os.path.exists(CACHE_HOME): + os.makedirs(CACHE_HOME) + @contextlib.contextmanager def tmp_file(): -- GitLab