def load_yaml(self, template_file): with open(template_file) as f: try: return yaml.safe_load(f) except yaml.YAMLError as e: print(e) return []