From f44fae97710483f71bb1cbdcbe5bb41656660486 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Wed, 23 Mar 2011 22:48:21 +0100 Subject: Python3 compatibility --- blogthon.cgi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'blogthon.cgi') diff --git a/blogthon.cgi b/blogthon.cgi index 1151890..d176c6c 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -18,7 +18,7 @@ import sys import time import locale import re -import ConfigParser +import configparser from cgi import FieldStorage from smtplib import SMTP from hashlib import md5 @@ -70,7 +70,7 @@ def document_header(string): print("") # Parse configuration -configuration = ConfigParser.SafeConfigParser() +configuration = configparser.SafeConfigParser() for config in ["../blogthonrc", "../.blogthonrc", "configuration"]: if os.path.exists(config): @@ -105,7 +105,7 @@ try: mail_to = configuration.get("smtp", "mail_to") smtp_host = configuration.get("smtp", "smtp_host") feed_preview = configuration.get("feed", "feed_preview") -except ConfigParser.Error, error: +except configparser.Error as error: errorpage(str(error)) if not re.match("^http:\/\/.*$", blog_url): -- cgit v1.2.3