(self, template_path, use_json)
| 161 | return 0 |
| 162 | |
| 163 | def _export(self, template_path, use_json): |
| 164 | template = Template(template_path, os.getcwd(), self.s3_uploader) |
| 165 | exported_template = template.export() |
| 166 | |
| 167 | if use_json: |
| 168 | exported_str = json.dumps( |
| 169 | exported_template, indent=4, ensure_ascii=False |
| 170 | ) |
| 171 | else: |
| 172 | exported_str = yaml_dump(exported_template) |
| 173 | |
| 174 | return exported_str |
| 175 | |
| 176 | def write_output(self, output_file_name, data): |
| 177 | if output_file_name is None: |