with open(infoex['csv_filename'], 'rb') as f:
log.debug("uploading FTP file '%s'" % (infoex['host']))
ftp = FTP(infoex['host'], infoex['uuid'], infoex['api_key'])
ftp.storlines('STOR ' + infoex['csv_filename'], f)
ftp.close()
f.close()
with open(infoex['csv_filename'], 'rb') as f:
log.debug("uploading FTP file '%s'" % (infoex['host']))
ftp = FTP(infoex['host'], infoex['uuid'], infoex['api_key'])
ftp.storlines('STOR ' + infoex['csv_filename'], f)
ftp.close()
f.close()