Commit 0f0d1177 authored by Julien Muchembled's avatar Julien Muchembled

default: fix case where 'location' does not contain any directory separator

This fixes:

  Traceback (most recent call last):
    ...
    File "slapos/recipe/build/__init__.py", line 268, in install
      return self._shared.install(self.__install)
    File "slapos/recipe/__init__.py", line 149, in install
      os.makedirs(parent)
    File "/usr/lib/python2.7/os.py", line 157, in makedirs
      mkdir(name, mode)
  OSError: [Errno 2] No such file or directory: ''
parent a2108d20
...@@ -145,7 +145,7 @@ class Shared(object): ...@@ -145,7 +145,7 @@ class Shared(object):
os.makedirs(location) os.makedirs(location)
else: else:
parent = os.path.dirname(location) parent = os.path.dirname(location)
if not os.path.isdir(parent): if parent and not os.path.isdir(parent):
os.makedirs(parent) os.makedirs(parent)
install() install()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment