Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 71317f5

Browse files
author
Olivier Gambier
committed
Fix test
Fixed broken path resolution Docker-DCO-1.1-Signed-off-by: Olivier Gambier <[email protected]> (github: dmp42)
1 parent 78ae525 commit 71317f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/test_layers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ def test_get_image_files_json(self):
190190

191191
layer_path = self.store.image_layer_path(layer_id)
192192
layer_path = os.path.join(self.store._root_path, layer_path)
193-
path_parts = layer_path.split(os.sep)
194-
layer_parent = os.path.join(*path_parts[:-1])
195-
os.makedirs(layer_parent)
193+
os.makedirs(os.path.dirname(layer_path))
196194

197195
with open(layer_path, 'w') as fobj:
198196
fobj.write(tfobj.read())

0 commit comments

Comments
 (0)