Skip to content

Commit fd71863

Browse files
committed
travis fix: allow preexisting log folder
1 parent 57cf47b commit fd71863

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/lib/base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def init_c_parentfs(self):
126126
self.__mk_dir__(self.mount_parent_abs_path)
127127
if not self.travis:
128128
self.__mount_parent_fs__()
129-
self.__mk_dir__(self.logs_abs_path)
129+
self.__mk_dir__(self.logs_abs_path, allow_preexisting = True)
130130

131131

132132
def init_d_childfs(self):
@@ -260,7 +260,11 @@ def __cleanup_loop_devices__(self):
260260
assert find_loop_devices(self.image_abs_path) == []
261261

262262

263-
def __mk_dir__(self, in_path, in_fs_root = False):
263+
def __mk_dir__(self, in_path, in_fs_root = False, allow_preexisting = False):
264+
265+
if allow_preexisting:
266+
if os.path.isdir(in_path):
267+
return
264268

265269
if not in_fs_root:
266270
os.mkdir(in_path)

0 commit comments

Comments
 (0)