mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Fix for attribute error when no newznab responses are available
This commit is contained in:
parent
bc16d23b4f
commit
c1a199d698
1 changed files with 7 additions and 4 deletions
|
@ -312,10 +312,13 @@ class NewznabProvider(generic.NZBProvider):
|
|||
logger.DEBUG)
|
||||
|
||||
# get total and offset attribs
|
||||
if total == 0:
|
||||
total = int(data.feed.newznab_response['total'] or 0)
|
||||
offset = int(data.feed.newznab_response['offset'] or 0)
|
||||
|
||||
try:
|
||||
if total == 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
|
||||
if total == 0:
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue