import csv
import datetime
import logging
+import os
import sys
import time
f.close()
if not options.dry_run:
+ # not a dry run
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()
+ os.remove(infoex['csv_filename'])
log.debug('DONE')