Private GIT

Skip to content
Snippets Groups Projects
Commit b5956f97 authored by miigotu's avatar miigotu
Browse files

Merge pull request #189 from fernandog/nzbget_log

Change some NZBget ERROR messages to WARNING
parents 31fd7d57 3d312cd3
Branches
Tags
No related merge requests found
...@@ -48,7 +48,7 @@ def sendNZB(nzb, proper=False): ...@@ -48,7 +48,7 @@ def sendNZB(nzb, proper=False):
nzbgetXMLrpc = "http://%(username)s:%(password)s@%(host)s/xmlrpc" nzbgetXMLrpc = "http://%(username)s:%(password)s@%(host)s/xmlrpc"
if sickbeard.NZBGET_HOST is None: if sickbeard.NZBGET_HOST is None:
logger.log(u"No NZBget host found in configuration. Please configure it.", logger.ERROR) logger.log(u"No NZBget host found in configuration. Please configure it.", logger.WARNING)
return False return False
url = nzbgetXMLrpc % {"host": sickbeard.NZBGET_HOST, "username": sickbeard.NZBGET_USERNAME, url = nzbgetXMLrpc % {"host": sickbeard.NZBGET_HOST, "username": sickbeard.NZBGET_USERNAME,
...@@ -59,17 +59,17 @@ def sendNZB(nzb, proper=False): ...@@ -59,17 +59,17 @@ def sendNZB(nzb, proper=False):
if nzbGetRPC.writelog("INFO", "SickRage connected to drop of %s any moment now." % (nzb.name + ".nzb")): if nzbGetRPC.writelog("INFO", "SickRage connected to drop of %s any moment now." % (nzb.name + ".nzb")):
logger.log(u"Successful connected to NZBget", logger.DEBUG) logger.log(u"Successful connected to NZBget", logger.DEBUG)
else: else:
logger.log(u"Successful connected to NZBget, but unable to send a message", logger.ERROR) logger.log(u"Successful connected to NZBget, but unable to send a message", logger.WARNING)
except httplib.socket.error: except httplib.socket.error:
logger.log( logger.log(
u"Please check your NZBget host and port (if it is running). NZBget is not responding to this combination", u"Please check your NZBget host and port (if it is running). NZBget is not responding to this combination",
logger.ERROR) logger.WARNING)
return False return False
except xmlrpclib.ProtocolError, e: except xmlrpclib.ProtocolError, e:
if e.errmsg == "Unauthorized": if e.errmsg == "Unauthorized":
logger.log(u"NZBget username or password is incorrect.", logger.ERROR) logger.log(u"NZBget username or password is incorrect.", logger.WARNING)
else: else:
logger.log(u"Protocol Error: " + e.errmsg, logger.ERROR) logger.log(u"Protocol Error: " + e.errmsg, logger.ERROR)
return False return False
...@@ -146,8 +146,8 @@ def sendNZB(nzb, proper=False): ...@@ -146,8 +146,8 @@ def sendNZB(nzb, proper=False):
logger.log(u"NZB sent to NZBget successfully", logger.DEBUG) logger.log(u"NZB sent to NZBget successfully", logger.DEBUG)
return True return True
else: else:
logger.log(u"NZBget could not add %s to the queue" % (nzb.name + ".nzb"), logger.ERROR) logger.log(u"NZBget could not add %s to the queue" % (nzb.name + ".nzb"), logger.WARNING)
return False return False
except Exception: except Exception:
logger.log(u"Connect Error to NZBget: could not add %s to the queue" % (nzb.name + ".nzb"), logger.ERROR) logger.log(u"Connect Error to NZBget: could not add %s to the queue" % (nzb.name + ".nzb"), logger.WARNING)
return False return False
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment