diff --git a/sabnzbd/growler.py b/sabnzbd/growler.py index 51ddfb9..e2ed0f2 100644 --- a/sabnzbd/growler.py +++ b/sabnzbd/growler.py @@ -175,6 +175,7 @@ def send_growl(title , msg, gtype): if _GROWL: assert isinstance(_GROWL, GrowlNotifier) _GROWL_REG = True + if not isinstance(msg, str): msg = str(msg) logging.debug('Send to Growl: %s %s %s', gtype, latin1(title), latin1(msg)) try: ret = _GROWL.notify( diff --git a/sabnzbd/misc.py b/sabnzbd/misc.py index 67be269..0500dc8 100644 --- a/sabnzbd/misc.py +++ b/sabnzbd/misc.py @@ -875,7 +875,10 @@ def bad_fetch(nzo, url, msg='', retry=False, content=False): retry : make retry link in histort content : report in history that cause is a bad NZB file """ - msg = unicoder(msg) + if msg: + msg = unicoder(msg) + else: + msg = '' pp = nzo.pp if pp is None: diff --git a/sabnzbd/newzbin.py b/sabnzbd/newzbin.py index 99e28c2..9a8f2f5 100644 --- a/sabnzbd/newzbin.py +++ b/sabnzbd/newzbin.py @@ -134,7 +134,7 @@ class MSGIDGrabber(Thread): else: # Fatal error, give up on this one bad_fetch(nzo, msgid, msg=nzo_info, retry=True) - msgid = None + msgid = None if msgid: growler.send_notification(T('NZB added to queue'), filename, 'download') @@ -190,7 +190,7 @@ def _grabnzb(msgid): pass if not (rcode or rtext): logging.error(T('Newzbin server changed its protocol')) - return None, None, None, None + return retry # Official return codes: # 200 = OK, NZB content follows