fixing last of anti-pattern issues
This commit is contained in:
parent
3b6482cb0a
commit
8debf21607
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue