From cb0fec3c03486dc200010368b8d3ec2828bed705 Mon Sep 17 00:00:00 2001 From: Disco-STU Date: Thu, 14 May 2009 10:23:42 +0200 Subject: Add exceeption if linklist not exist --- blogthon.cgi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'blogthon.cgi') diff --git a/blogthon.cgi b/blogthon.cgi index 2fcb619..bc246ab 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -243,13 +243,16 @@ else: if linklist == "True": print '
' print ' links
' - content = open("linklist", "r") - for line in content: - if line.strip() is "": - print '
' - else: - print '  ' + line.split(" ", 1)[1].strip() + ' 
' - content.close() + try: + content = open("linklist", "r") + for line in content: + if line.strip() is "": + print '
' + else: + print '  ' + line.split(" ", 1)[1].strip() + ' 
' + content.close() + except: + print '
' print '
' print ' ' -- cgit v1.2.3