4
0
Fork 0

Fixed tempfile creation again
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Pünkösd Marcell 2020-04-30 00:45:15 +02:00
parent 4c14d5d37c
commit 6109d60052
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ def run_everything(parameters: dict):
tag = parameters['tag']
logging.info(f"Downloading sample: {tag}")
file_path = tempfile.mktemp(prefix=f"{tag}_", suffix=".wav", dir="extractor-service")
_, file_path = tempfile.mkstemp(prefix=f"{tag}_", suffix=".wav")
r = requests.get(f"http://storage-service/object/{tag}")
with open(file_path, 'wb') as f:
f.write(r.content)