From 3c370fc5c9d348c7b37cf9f83c3b3562c62caa71 Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 22 Jun 2014 19:51:00 -0700 Subject: [PATCH] Fix for tornado redirect function, was not properly returning. --- sickbeard/webserve.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 5df8ff27..9d19d19b 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -154,11 +154,11 @@ class MainHandler(RequestHandler): def http_error_404_handler(self): """ Custom handler for 404 error, redirect back to main page """ - self.redirect('/home/') + return self.redirect('/home/') def write_error(self, status_code, **kwargs): if status_code == 404: - self.redirect('/home/') + return self.redirect('/home/') elif status_code == 401: self.finish(self.http_error_401_handler()) else: @@ -209,7 +209,7 @@ class MainHandler(RequestHandler): def redirect(self, url, permanent=False, status=None): self._transforms = [] - super(MainHandler, self).redirect(sickbeard.WEB_ROOT + url, permanent, status) + return super(MainHandler, self).redirect(sickbeard.WEB_ROOT + url, permanent, status) def get(self, *args, **kwargs): response = self._dispatch()