fix max == none

pull/91/head
eric 2018-02-22 11:06:40 -05:00
parent a6def2171d
commit fae854cd57
1 changed files with 2 additions and 2 deletions

View File

@ -30,9 +30,9 @@ class Command(BaseCommand):
books = []
for sitemap in content:
added = add_by_sitemap(sitemap.strip(), maxnum=max)
max = max - len(added)
max = max - len(added) if max else max
books = books + added
if max < 0:
if max and max < 0:
break
else:
books = add_by_sitemap(url, maxnum=max)