1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-08-13 16:53:54 -04: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."""
def __init__(self, url, permanent=False, status=None):
self.url = url
self.url = urlparse.urljoin(sickbeard.WEB_ROOT, url)
self.permanent = permanent
self.status = status
Exception.__init__(self, url, permanent, status)
Exception.__init__(self, self.url, self.permanent, self.status)
def __call__(self):
"""Use this exception as a request.handler (raise self)."""
raise self
def redirect(url, permanent=False, status=None):
url = urlparse.urljoin(sickbeard.WEB_ROOT, url)
raise HTTPRedirect(url, permanent, status)
@authenticated