def action(self): file = NoaaCycle.current_file() local_dir = self.download_dir + '/' + NoaaCycle.current_date() # 2do select FTP client depending on configuration (development|production) # mock-up client for a while session = FTP2(self.ftp_host) self.log.info("Connected to %s" % self.ftp_host) self.log.info("Downloading %s/%s" % (self.remote_dir, file)) try: session.login() session.cwd(self.remote_dir) self.download(session, local_dir, file) except Exception, e: self.log.error("%s" % e)