I'm running some code with a sys.exit() call at the end. Without the sys.exit() line, the self.response works just fine and renders the template. But when I call sys.exit(), the page returns blank. It's almost like sys.exit() is interrupting the template mid-render. Why is it doing this?
page = 'index.html'
template_values = {}
path = os.path.join(os.path.dirname(__file__), page)
self.response.out.write(template.render(path, template_values))
sys.exit()
EDIT I've solved my problem by using "return" instead of "sys.exit()"