diff options
author | Stefan Ritter <xeno@thehappy.de> | 2009-03-09 01:40:15 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2009-03-09 01:40:15 +0100 |
commit | aa2d5186f6f7566aae139876f253694aed50ef8d (patch) | |
tree | 8b813a71e2040160f8e40bacb8ce327c55d77fc1 | |
parent | 5d99e09263a3d3a946eb4920a03fe5ec5bcd3d22 (diff) |
Linklist:
Fixed a bug that occurs when adding an empty line to the list
-rwxr-xr-x | blogthon.cgi | 10 |
1 files 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 ' <div class="screen"><div class="sidebar">' +# Sidebar: Staticpages if staticpages == "True": staticpages = [] staticpages_list = glob.glob(staticpages_dir + '*') @@ -123,6 +124,7 @@ if staticpages == "True": if monthlist == "True": print ' <br />' print ' </div>' +# Sidebar: Monthlist if monthlist == "True": olddate = "" print ' <div class="sidebarentry">' @@ -136,14 +138,16 @@ if monthlist == "True": if linklist == "True": print ' <br />' print ' </div>' +# Sidebar: Linklist if linklist == "True": - content = open("linklist", "r") print ' <div class="sidebarentry">' print ' <small>links</small><br />' + content = open("linklist", "r") for line in content: - print ' <a href=' + line.split(" ")[0] + ' target=_blank>' + line.split(" ", 1)[1].strip() + '</a> <br />' - print ' </div>' + if not line.strip() is "": + print ' <a href=' + line.split(" ")[0] + ' target=_blank>' + line.split(" ", 1)[1].strip() + '</a> <br />' content.close() + print ' </div>' print ' </div>' print ' <div class="content">' |