Remove exceptions for entries_dir
This commit is contained in:
parent
c46d219390
commit
50e5c532f7
@ -216,13 +216,9 @@ if cname and ctext and ctitle:
|
|||||||
else:
|
else:
|
||||||
comments_file = os.path.join(entries_dir, ctitle + ".comments")
|
comments_file = os.path.join(entries_dir, ctitle + ".comments")
|
||||||
if not os.path.exists(comments_file):
|
if not os.path.exists(comments_file):
|
||||||
try:
|
|
||||||
content = open(comments_file, "w")
|
content = open(comments_file, "w")
|
||||||
content.close()
|
content.close()
|
||||||
except:
|
|
||||||
errorpage("\"%s\" isn\'t writable!" % entries_dir)
|
|
||||||
|
|
||||||
try:
|
|
||||||
content = open(comments_file, "a")
|
content = open(comments_file, "a")
|
||||||
content.write("-." + cname + "\n")
|
content.write("-." + cname + "\n")
|
||||||
content.write("+." + time.strftime("%c", time.localtime()) + "\n")
|
content.write("+." + time.strftime("%c", time.localtime()) + "\n")
|
||||||
@ -238,8 +234,6 @@ if cname and ctext and ctitle:
|
|||||||
smtp.starttls()
|
smtp.starttls()
|
||||||
smtp.sendmail(blog_title, mail_to, msg)
|
smtp.sendmail(blog_title, mail_to, msg)
|
||||||
smtp.quit()
|
smtp.quit()
|
||||||
except:
|
|
||||||
errorpage("Comment cannot be written!")
|
|
||||||
|
|
||||||
# Read entries and store their title and timestamp
|
# Read entries and store their title and timestamp
|
||||||
entries = []
|
entries = []
|
||||||
|
Loading…
Reference in New Issue
Block a user