[library-web] avoid duplicated pages when creating mallard cache
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] avoid duplicated pages when creating mallard cache
- Date: Wed, 29 Jan 2014 21:17:46 +0000 (UTC)
commit ea90292618b506f488e2f6b95be414d10a3c8e33
Author: Frédéric Péters <fpeters 0d be>
Date: Wed Jan 29 21:17:33 2014 +0000
avoid duplicated pages when creating mallard cache
src/modtypes/mallard.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 86876ae..3cbadf7 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -172,6 +172,9 @@ class MallardCache:
page = MallardPage(filename)
if page.id is None:
return
+ if page.id in [x.id for x in self.all_pages]:
+ # avoid duplicated pages
+ return
self.all_pages.append(page)
return page
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]