diff options
author | Stefan Ritter <xeno@thehappy.de> | 2009-12-06 17:03:28 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2009-12-06 17:03:28 +0100 |
commit | d26d49f03c6fcf9b80d0a512fe0a3eab05834d71 (patch) | |
tree | 52865266c80eaeee9274a03d6787e458fb50fb4a | |
parent | e89bbb6bc325876690ea36471b71b98b6c222ff8 (diff) |
Added '../blogthonrc' as alternative configuration
Diffstat (limited to '')
-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!') |