From: Alexander Vasarab Date: Sat, 20 Jun 2020 04:26:26 +0000 (-0700) Subject: Uncomment FTP upload code X-Git-Tag: v1.0.0^2~3 X-Git-Url: https://wylark.com/src/infoex-autowx.git/commitdiff_plain/9eb3f3d88ae216472fdcf6db4bcf1d2542477686 Uncomment FTP upload code --- diff --git a/infoex-autowx.py b/infoex-autowx.py index a4e50a9..4f6c9dc 100755 --- a/infoex-autowx.py +++ b/infoex-autowx.py @@ -224,11 +224,11 @@ with open(infoex['csv_filename'], 'w') as f: writer.writerow(final_data) 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() +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() log.debug('DONE')