From c26a0a14b3f27f9381f02144f5d3d9c297c17b51 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 31 May 2010 12:13:38 +0000 Subject: [PATCH] ignore invalid blog items --- wortschlucker/src/wortschlucker.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wortschlucker/src/wortschlucker.py b/wortschlucker/src/wortschlucker.py index 6b5e671..0981d36 100755 --- a/wortschlucker/src/wortschlucker.py +++ b/wortschlucker/src/wortschlucker.py @@ -611,7 +611,13 @@ def serve_blog(blog_id=None): if not result is None: return result # if anything fails: render the blog list - value_dict["blog_list"] = [get_blog_info(blog_id) for blog_id in get_blog_ids()] + blog_list = [] + # add all valid blog infos to the list + for blog_id in get_blog_ids(): + blog_info = get_blog_info(blog_id) + if not blog_info is None: + blog_list.append(blog_info) + value_dict["blog_list"] = blog_list return render("blog_list.html", **value_dict) @bobo.query('')