def write_file(self, filehandle, filename):
        filehandle.seek(0)
        backuppath = os.path.join(self.FTP_PATH, filename)
        self.ftp.storbinary('STOR ' + backuppath, filehandle)
Backport of itertools.chain.from_iterable
dataset/ETHPy150Open django-dbbackup/django-dbbackup/dbbackup/storage/ftp_storage.py/Storage.write_file--crossover with--dataset/ETHPy150Open divio/django-cms/cms/sitemaps/cms_sitemap.py/from_iterable