diff options
Diffstat (limited to 'blogthon.cgi')
-rwxr-xr-x | blogthon.cgi | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/blogthon.cgi b/blogthon.cgi index 4fb7c52..fe746fb 100755 --- a/blogthon.cgi +++ b/blogthon.cgi @@ -55,7 +55,15 @@ def document_header(string): print '<rss version="2.0">' configuration = ConfigParser.ConfigParser() -configuration.read('configuration') + +# First look for ../blogthonrc and then for ./configuration +if os.path.exists('../blogthonrc'): + configuration.read('../blogthonrc') +elif os.path.exists('configuration'): + configuration.read('configuration') +else: + errorpage('No suitable configuration found!') + sys.exit() try: blog_title = configuration.get('personal', 'blog_title') except: errorpage('"blog_title" is missing in configuration!') |