From b84493152839859ec699beaddc86a01cdee2dc43 Mon Sep 17 00:00:00 2001 From: nathom Date: Tue, 30 Mar 2021 14:24:08 -0700 Subject: [PATCH] Fix Issue #14 Need to make the directory before constructing a Config object. --- streamrip/cli.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/streamrip/cli.py b/streamrip/cli.py index c9129ad..81fec19 100644 --- a/streamrip/cli.py +++ b/streamrip/cli.py @@ -10,12 +10,13 @@ from .core import MusicDL from .utils import init_log logger = logging.getLogger(__name__) -config = Config(CONFIG_PATH) if not os.path.isdir(CONFIG_DIR): - os.makedirs(CONFIG_DIR) + os.makedirs(CONFIG_DIR, exist_ok=True) if not os.path.isdir(CACHE_DIR): - os.makedirs(CONFIG_DIR) + os.makedirs(CONFIG_DIR, exist_ok=True) + +config = Config(CONFIG_PATH) @click.group(invoke_without_command=True)