From 4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 14 May 2020 18:22:28 -0700 Subject: 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 --- catalyst/base/targetbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'catalyst/base') 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: -- cgit v1.2.3-65-gdbad