mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Test fix for webroot issues.
This commit is contained in:
parent
508c094f48
commit
e7b5a2c6c0
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue