From 7177285f9958398d9f33ba4f5a15a1a821102df6 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 1 Oct 2020 13:36:48 -0500 Subject: [PATCH] Another py3 can't compare to None fix. --- fanficfare/adapters/adapter_archiveofourownorg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fanficfare/adapters/adapter_archiveofourownorg.py b/fanficfare/adapters/adapter_archiveofourownorg.py index 3bc8cc2d..bf1cbc93 100644 --- a/fanficfare/adapters/adapter_archiveofourownorg.py +++ b/fanficfare/adapters/adapter_archiveofourownorg.py @@ -396,7 +396,7 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter): self.story.setMetadata('seriesUrl',series_url) def hookForUpdates(self,chaptercount): - if self.oldchapters and len(self.oldchapters) > self.newestChapterNum: + if self.newestChapterNum and self.oldchapters and len(self.oldchapters) > self.newestChapterNum: logger.info("Existing epub has %s chapters\nNewest chapter is %s. Discarding old chapters from there on."%(len(self.oldchapters), self.newestChapterNum+1)) self.oldchapters = self.oldchapters[:self.newestChapterNum] return len(self.oldchapters)