aboutsummaryrefslogtreecommitdiffstats
path: root/blogthon.cgi
diff options
context:
space:
mode:
authorAdrian Vondendriesch <discostu@81-89-105-205.(none)>2009-06-01 03:45:21 +0200
committerAdrian Vondendriesch <discostu@81-89-105-205.(none)>2009-06-01 03:45:21 +0200
commita1cf3893a9679fac6b22f3e1a0de7971740a472b (patch)
tree509be6e1eca808bd0cf013e9f89fa6dc158e262d /blogthon.cgi
parent76e671fcfeadae8c1375eb6a142f54584a1f2927 (diff)
Added exception for non-writable entries_dir
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-xblogthon.cgi9
1 files changed, 7 insertions, 2 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index d0fd58d..053258b 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -38,6 +38,8 @@ def errorpage(string):
print ' Directory <b>"' + staticpages_dir + '"</b> does not exist!'
elif string == "linklist":
print ' File <b>"linklist"</b> does not exist!'
+ elif string =="not writable entries_dir":
+ print ' Admin is a dumbass!!! Tell him to make his entries_dir writable.'
else:
print ' <b>' + string + '</b> is not set in configuration, please check your installation!'
print '</body>'
@@ -155,8 +157,11 @@ if cname and ctext and ctitle:
else:
comments_file = glob.glob(entries_dir + ctitle + '.comments')
if not comments_file:
- content = open(entries_dir + ctitle + '.comments', "w")
- content.close()
+ try:
+ content = open(entries_dir + ctitle + '.comments', "w")
+ content.close()
+ except:
+ errorpage('not writable entries_dir')
comments_file = glob.glob(entries_dir + ctitle + '.comments')
content = open(comments_file[0], "a+")
content.write("-." + cname + "\n")