From 9eb3f3d88ae216472fdcf6db4bcf1d2542477686 Mon Sep 17 00:00:00 2001 From: Alexander Vasarab Date: Fri, 19 Jun 2020 21:26:26 -0700 Subject: [PATCH 1/1] Uncomment FTP upload code --- infoex-autowx.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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') -- 2.30.2