From 8debf21607b40a7c82596bc6e19e7565d6478805 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 7 Jul 2020 12:49:00 +0530 Subject: fixing last of anti-pattern issues --- app/dock_docker.py | 1 - tests/backendTest.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/dock_docker.py b/app/dock_docker.py index 895b92f..c5e897c 100644 --- a/app/dock_docker.py +++ b/app/dock_docker.py @@ -69,7 +69,6 @@ f = os.path.join(cd,"static/uploads") #c = os.path.join(f,"configs",config) print(f) import tempfile -from shutil import copy from shutil import make_archive with tempfile.TemporaryDirectory() as directory: diff --git a/tests/backendTest.py b/tests/backendTest.py index 33b6019..5b5a453 100644 --- a/tests/backendTest.py +++ b/tests/backendTest.py @@ -28,7 +28,7 @@ def email(compressedFile): msg.attach(MIMEText(body, 'plain')) filename = "Curie_Web_Results_Job_ID_" + str(jobID) + ".zip" p = MIMEBase('application', 'octet-stream') - with open((str(zi) + ".zip"), "rb") as attachment: + with open((str(compressedFile) + ".zip"), "rb") as attachment: p.set_payload((attachment).read()) encoders.encode_base64(p) p.add_header('Content-Disposition', "attachment; filename= %s" % filename) -- cgit v1.2.3