diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-07 10:06:39 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-06-07 10:45:52 +0200 |
commit | 4716a3dfca1ef800668797eaea5cbc25fc59fd30 (patch) | |
tree | fe89bbabb0754f06baa509aa962aef9046cfd6eb | |
parent | a921631ca9cd9b06cc6af2f9d8ba1c80dd890f5c (diff) | |
download | rumba-4716a3dfca1ef800668797eaea5cbc25fc59fd30.tar.gz rumba-4716a3dfca1ef800668797eaea5cbc25fc59fd30.zip |
executors: Fix fetching file with docker
Fetching a file with docker was not working properly, since path was
called instead of os.path.
-rw-r--r-- | rumba/executors/docker.py | 6 |
1 files 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) |