From 25bae61520a121f5f475c9606f1a5dff0ed94f71 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 29 May 2018 16:41:43 -0700 Subject: [PATCH] Fix make_dnf_dirs It was chopping off an extra directory level due to realpath removing the trailing / from the paths when they are setup. --- src/pylorax/api/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pylorax/api/config.py b/src/pylorax/api/config.py index 2258a174..336dbad4 100644 --- a/src/pylorax/api/config.py +++ b/src/pylorax/api/config.py @@ -75,8 +75,11 @@ def make_yum_dirs(conf): :returns: None """ for p in ["yum_conf", "repo_dir", "cache_dir", "yum_root"]: - p_dir = os.path.dirname(conf.get("composer", p)) - if not os.path.exists(p_dir): + p_dir = os.path.abspath(conf.get("composer", p)) + if p == "yum_conf": + p_dir = os.path.dirname(p_dir) + + if not os.path.isdir(p_dir): os.makedirs(p_dir) def make_queue_dirs(conf, gid):