Merge tag 'gzip-csvmail' into develop
hotfix csv file decompression
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user