From 0cea8275748dcaf2863756b964b6d986ba839d4f Mon Sep 17 00:00:00 2001 From: Pall Valmundsson Date: Sun, 6 Nov 2011 19:55:10 +0000 Subject: [PATCH] Fix if SAB_HOST ends with / --- headphones/sab.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/headphones/sab.py b/headphones/sab.py index d7763378..6a9856f7 100644 --- a/headphones/sab.py +++ b/headphones/sab.py @@ -67,6 +67,9 @@ def sendNZB(nzb): if not headphones.SAB_HOST.startswith('http'): headphones.SAB_HOST = 'http://' + headphones.SAB_HOST + + if headphones.SAB_HOST.endswith('/'): + headphones.SAB_HOST = headphones.SAB_HOST[0:len(headphones.SAB_HOST)-1] url = headphones.SAB_HOST + "/" + "api?" + urllib.urlencode(params) @@ -119,4 +122,4 @@ def sendNZB(nzb): return False else: logger.info(u"Unknown failure sending NZB to sab. Return text is: " + sabText) - return False \ No newline at end of file + return False