Added '../blogthonrc' as alternative configuration
This commit is contained in:
parent
e89bbb6bc3
commit
d26d49f03c
@ -55,7 +55,15 @@ def document_header(string):
|
||||
print '<rss version="2.0">'
|
||||
|
||||
configuration = ConfigParser.ConfigParser()
|
||||
|
||||
# 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!')
|
||||
|
Loading…
Reference in New Issue
Block a user