From aa2d5186f6f7566aae139876f253694aed50ef8d Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Mon, 9 Mar 2009 01:40:15 +0100 Subject: [PATCH] Linklist: Fixed a bug that occurs when adding an empty line to the list --- blogthon.cgi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/blogthon.cgi b/blogthon.cgi index eeeb1a0..8c5d0aa 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -105,6 +105,7 @@ else: print '
' +# Sidebar: Monthlist if monthlist == "True": olddate = "" print '
' @@ -136,14 +138,16 @@ if monthlist == "True": if linklist == "True": print '
' print '
' +# Sidebar: Linklist if linklist == "True": - content = open("linklist", "r") print '
' print ' links
' + content = open("linklist", "r") for line in content: - print '  ' + line.split(" ", 1)[1].strip() + ' 
' - print '
' + if not line.strip() is "": + print '  ' + line.split(" ", 1)[1].strip() + ' 
' content.close() + print '
' print ' ' print '
'