From 4716a3dfca1ef800668797eaea5cbc25fc59fd30 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Thu, 7 Jun 2018 10:06:39 +0200 Subject: executors: Fix fetching file with docker Fetching a file with docker was not working properly, since path was called instead of os.path. --- rumba/executors/docker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rumba/executors/docker.py b/rumba/executors/docker.py index e3d40dc..8587878 100644 --- a/rumba/executors/docker.py +++ b/rumba/executors/docker.py @@ -28,6 +28,7 @@ from rumba import model as mod import tempfile import tarfile +import os from rumba import log @@ -67,11 +68,10 @@ class DockerExecutor(mod.Executor): for c in archive: tmp.write(c) - tmp.seek(0) - tarfile.TarFile(fileobj=tmp, mode='r').extract( - path.basename(path), destination) + tarball = tarfile.TarFile(fileobj=tmp, mode='r') + tarball.extract(os.path.basename(path), destination) except: logger.error("Error when extracting %s" % path) -- cgit v1.2.3