mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-22 12:49:26 +00:00
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:
@@ -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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user