Add exceeption if linklist not exist

This commit is contained in:
Disco-STU 2009-05-14 10:23:42 +02:00
parent b6d3ef1b04
commit cb0fec3c03
1 changed files with 10 additions and 7 deletions

View File

@ -243,6 +243,7 @@ else:
if linklist == "True":
print ' <div class="sidebarentry">'
print ' <small>links</small><br />'
try:
content = open("linklist", "r")
for line in content:
if line.strip() is "":
@ -250,6 +251,8 @@ else:
else:
print ' &nbsp;<a href="' + line.split(" ")[0] + '" target="_blank">' + line.split(" ", 1)[1].strip() + '</a>&nbsp;<br />'
content.close()
except:
print ' <br />'
print ' </div>'
print ' </div>'