Private
Public Access
1
0

Merge branch 'hotfix/gzip-csvmail'

This commit is contained in:
Sander Roosendaal
2016-12-09 08:10:49 +01:00

View File

@@ -93,8 +93,8 @@ def handle_sendemailcsv(first_name,last_name,email,csvfile):
if os.path.isfile(csvfile):
email.attach_file(csvfile)
else:
csvfile2 = csvfile[:-3]
with gzip.open(csvfile,'rb') as f_in, open(csvfile2,'wb') as f_out:
csvfile2 = csvfile
with gzip.open(csvfile+'.gz','rb') as f_in, open(csvfile2,'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
email.attach_file(csvfile2)