Fixed a couple log messages in sab.py to make it a little less redundant and fixed some log grammar in requests.py

This commit is contained in:
rembo10
2015-05-16 19:40:13 -07:00
parent 1bbf9a2318
commit f808dd131b
2 changed files with 3 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ def request_response(url, method="get", auto_raise=True,
"host is up and running.")
except requests.Timeout:
logger.error(
"Request timed out. The remote host did not respond timely.")
"Request timed out. The remote host did not respond in a timely manner.")
except requests.HTTPError as e:
if e.response is not None:
if e.response.status_code >= 500:

View File

@@ -48,14 +48,13 @@ def sab_api_call(request_type=None, params={}, **kwargs):
params['output']='json'
logger.info("Attempting to connect to SABnzbd on url: %s" % url)
response = request.request_json(url, params=params, **kwargs)
if not response:
logger.error("Error connecting to SABnzbd on url: %s" % url)
logger.error("Error connecting to SABnzbd on url: %s" % headphones.CONFIG.SAB_HOST)
return False
else:
logger.info("Successfully connected to SABnzbd on url: %s" % url)
logger.info("Successfully connected to SABnzbd on url: %s" % headphones.CONFIG.SAB_HOST)
return response
def sendNZB(nzb):