def _export_files_content(self, entity, output_folder):
    for template in entity.files():
        file_name = template.name
        try:
            with open(os.path.join(output_folder, file_name), 'w') as f:
                if six.PY2:
                    f.write(template.read_content().encode('utf-8'))
                else:
                    f.write(template.read_content())
        except ApiException as e:
            if (e.code == 404):
                pass
            else:
                raise e
def _export_files_content(self, entity, output_folder):
    for template in entity.files():
        file_name = template.name
        try:
            with open(os.path.join(output_folder, file_name), 'w') as f:
                if six.PY2:
                    f.write(template.read_content().encode('utf-8'))
                else:
                    f.write(template.read_content())
        except ApiException as e:
            if (e.code == 404):
                pass
            else:
                raise e