aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2020-05-14 18:22:28 -0700
committerMatt Turner <mattst88@gentoo.org>2020-05-14 20:39:56 -0700
commit4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35 (patch)
treedc1f78b3ce569691c2e40337bb4b7dd154c36e4e
parentcatalyst: Add error checking to snapshot target (diff)
downloadcatalyst-4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35.tar.gz
catalyst-4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35.tar.bz2
catalyst-4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35.zip
catalyst: Make parent directories of snapshots/
Otherwise, if /var/tmp/catalyst does not exist when the snapshot target is executed it will fail to make the snapshots/ directory. Signed-off-by: Matt Turner <mattst88@gentoo.org>
-rw-r--r--catalyst/base/targetbase.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/catalyst/base/targetbase.py b/catalyst/base/targetbase.py
index 5bcea920..3e338bee 100644
--- a/catalyst/base/targetbase.py
+++ b/catalyst/base/targetbase.py
@@ -24,7 +24,7 @@ class TargetBase(ABC):
def set_snapshot(self, treeish=None):
# Make snapshots directory
snapshot_dir = Path(self.settings['storedir'], 'snapshots')
- snapshot_dir.mkdir(mode=0o755, exist_ok=True)
+ snapshot_dir.mkdir(mode=0o755, parents=True, exist_ok=True)
repo_name = self.settings['repo_name']
if treeish is None: