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