1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-16 14:25:02 -05:00

Test fix for webroot issues.

This commit is contained in:
echel0n 2014-06-30 01:15:10 -07:00
parent 508c094f48
commit e7b5a2c6c0

View File

@ -129,17 +129,16 @@ class HTTPRedirect(Exception):
"""Exception raised when the request should be redirected.""" """Exception raised when the request should be redirected."""
def __init__(self, url, permanent=False, status=None): def __init__(self, url, permanent=False, status=None):
self.url = url self.url = urlparse.urljoin(sickbeard.WEB_ROOT, url)
self.permanent = permanent self.permanent = permanent
self.status = status self.status = status
Exception.__init__(self, url, permanent, status) Exception.__init__(self, self.url, self.permanent, self.status)
def __call__(self): def __call__(self):
"""Use this exception as a request.handler (raise self).""" """Use this exception as a request.handler (raise self)."""
raise self raise self
def redirect(url, permanent=False, status=None): def redirect(url, permanent=False, status=None):
url = urlparse.urljoin(sickbeard.WEB_ROOT, url)
raise HTTPRedirect(url, permanent, status) raise HTTPRedirect(url, permanent, status)
@authenticated @authenticated