Add exceeption if linklist not exist
This commit is contained in:
parent
b6d3ef1b04
commit
cb0fec3c03
@ -243,6 +243,7 @@ else:
|
|||||||
if linklist == "True":
|
if linklist == "True":
|
||||||
print ' <div class="sidebarentry">'
|
print ' <div class="sidebarentry">'
|
||||||
print ' <small>links</small><br />'
|
print ' <small>links</small><br />'
|
||||||
|
try:
|
||||||
content = open("linklist", "r")
|
content = open("linklist", "r")
|
||||||
for line in content:
|
for line in content:
|
||||||
if line.strip() is "":
|
if line.strip() is "":
|
||||||
@ -250,6 +251,8 @@ else:
|
|||||||
else:
|
else:
|
||||||
print ' <a href="' + line.split(" ")[0] + '" target="_blank">' + line.split(" ", 1)[1].strip() + '</a> <br />'
|
print ' <a href="' + line.split(" ")[0] + '" target="_blank">' + line.split(" ", 1)[1].strip() + '</a> <br />'
|
||||||
content.close()
|
content.close()
|
||||||
|
except:
|
||||||
|
print ' <br />'
|
||||||
print ' </div>'
|
print ' </div>'
|
||||||
|
|
||||||
print ' </div>'
|
print ' </div>'
|
||||||
|
Loading…
Reference in New Issue
Block a user