commit:     4d2ed2e6ea5bf5e2d79a7a9e9726748752986a35
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May 15 01:22:28 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri May 15 03:39:56 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=4d2ed2e6

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 <AT> gentoo.org>

 catalyst/base/targetbase.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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:

Reply via email to