mirror of https://github.com/buildinspace/peru.git
Merge pull request #173 from edbrannin/use-contrib-makedirs
Use contrib.makedirs instead of os.makedirs in cache.py
This commit is contained in:
commit
a05629d0ed
|
@ -267,7 +267,7 @@ class _Cache:
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _init_trees(self):
|
def _init_trees(self):
|
||||||
if not os.path.exists(os.path.join(self.trees_path, 'HEAD')):
|
if not os.path.exists(os.path.join(self.trees_path, 'HEAD')):
|
||||||
os.makedirs(self.trees_path)
|
makedirs(self.trees_path)
|
||||||
with self.clean_git_session() as session:
|
with self.clean_git_session() as session:
|
||||||
yield from session.init_git_dir()
|
yield from session.init_git_dir()
|
||||||
# Override any .gitattributes files that might be in the sync dir,
|
# Override any .gitattributes files that might be in the sync dir,
|
||||||
|
@ -358,8 +358,7 @@ class _Cache:
|
||||||
tree = tree or (yield from self.get_empty_tree())
|
tree = tree or (yield from self.get_empty_tree())
|
||||||
previous_tree = previous_tree or (yield from self.get_empty_tree())
|
previous_tree = previous_tree or (yield from self.get_empty_tree())
|
||||||
|
|
||||||
if not os.path.exists(dest):
|
makedirs(dest)
|
||||||
os.makedirs(dest)
|
|
||||||
|
|
||||||
with contextlib.ExitStack() as stack:
|
with contextlib.ExitStack() as stack:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue