def _TemplateNamesToFiles(self, template_str):
        """Parses a string of templates into a list of file handles."""
        template_list = template_str.split(":")
        template_files = []
        try:
            for tmplt in template_list:
                template_files.append(open(os.path.join(self.template_dir, tmplt), "r"))
        except:  # noqa
            for tmplt in template_files:
                tmplt.close()
            raise

        return template_files