Avoid exception if a post doesn't exists
Avoid duplicating messages in report
This commit is contained in:
parent
0150b9f6cd
commit
e0da2df75f
|
@ -47,6 +47,7 @@ class DynastieGenerator:
|
|||
self.hash_posts_content = hash_posts_content
|
||||
|
||||
def addReport(self, string, color=''):
|
||||
if string in self.report: return
|
||||
if color != '':
|
||||
self.report = self.report + '<span style="color:' + color + '">'
|
||||
self.report = self.report + '<b>' + self.__class__.__name__ + '</b> : '
|
||||
|
|
|
@ -216,6 +216,7 @@ class Index(DynastieGenerator):
|
|||
if len(posts) > self.cur_post:
|
||||
self.cur_post_obj = posts[self.cur_post]
|
||||
post_elem = self.createPost(posts, dom, post_elem, node)
|
||||
if post_elem is None: continue
|
||||
else:
|
||||
post_elem = self.createElement(dom, '', '<b>No posts yet</b>')
|
||||
self.cur_post_obj = None
|
||||
|
|
Loading…
Reference in New Issue
Block a user