mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-07 11:58:01 -05:00
Fix for attribute error when no newznab responses are available
This commit is contained in:
parent
bc16d23b4f
commit
c1a199d698
@ -312,10 +312,13 @@ class NewznabProvider(generic.NZBProvider):
|
|||||||
logger.DEBUG)
|
logger.DEBUG)
|
||||||
|
|
||||||
# get total and offset attribs
|
# get total and offset attribs
|
||||||
if total == 0:
|
try:
|
||||||
total = int(data.feed.newznab_response['total'] or 0)
|
if total == 0:
|
||||||
offset = int(data.feed.newznab_response['offset'] or 0)
|
total = int(data.feed.newznab_response['total'] or 0)
|
||||||
|
offset = int(data.feed.newznab_response['offset'] or 0)
|
||||||
|
except AttributeError:
|
||||||
|
break
|
||||||
|
|
||||||
# No items found, prevent from doing another search
|
# No items found, prevent from doing another search
|
||||||
if total == 0:
|
if total == 0:
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user