def get_contents(self, origin):
        """
        Try to load the origin.
        """
        try:
            path = self.get_app_template_path(
                origin.app_name, origin.template_name)
            with io.open(path, encoding=self.engine.file_charset) as fp:
                return fp.read()
        except KeyError:
            raise TemplateDoesNotExist(origin)
        except IOError as error:
            if error.errno == errno.ENOENT:
                raise TemplateDoesNotExist(origin)
            raise
Try to load the origin.