commit a0c0f46391fd63d5941598ad163b40096f7d4e00
Author: Radek Pazdera <rpazdera(a)redhat.com>
Date: Wed Nov 21 13:11:02 2012 +0100
ResourceCache: Fixed Cache Dir Creation Bug
When a name of non-existent directory was put into the configuration,
lnst-slave did correctly create it, but when larger part of the tree
was non-existent it crashed down with an exception.
This patch fixes that. lnst-slave will create all the parent directories
as necessary.
Signed-off-by: Radek Pazdera <rpazdera(a)redhat.com>
lnst/Common/ResourceCache.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lnst/Common/ResourceCache.py b/lnst/Common/ResourceCache.py
index fff617c..7cf2f0e 100644
--- a/lnst/Common/ResourceCache.py
+++ b/lnst/Common/ResourceCache.py
@@ -33,7 +33,7 @@ class ResourceCache(object):
else:
raise ResourceCacheError("Invalid cache path (%s)" %
cache_path)
else:
- os.mkdir(cache_path)
+ os.makedirs(cache_path)
self._root = cache_path
self._read_index()
Show replies by date