mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
all test pass
This commit is contained in:
parent
3cd84ab396
commit
dc6934be43
5 changed files with 61 additions and 12 deletions
|
|
@ -55,6 +55,13 @@ def read_settings(filename):
|
|||
if key.isupper():
|
||||
context[key] = tempdict[key]
|
||||
|
||||
# Make the paths relative to the settings file
|
||||
for path in ['PATH', 'OUTPUT_PATH']:
|
||||
if path in context:
|
||||
if context[path] is not None and not os.path.isabs(context[path]):
|
||||
# FIXME:
|
||||
context[path] = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(filename), context[path])))
|
||||
|
||||
# if locales is not a list, make it one
|
||||
locales = context['LOCALE']
|
||||
|
||||
|
|
@ -74,11 +81,5 @@ def read_settings(filename):
|
|||
else:
|
||||
log.warn("LOCALE option doesn't contain a correct value")
|
||||
|
||||
# Make the paths relative to the settings file
|
||||
for path in ['PATH', 'OUTPUT_PATH']:
|
||||
if path in context:
|
||||
if context[path] is not None and not os.path.isabs(context[path]):
|
||||
context[path] = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(filename), context[path])))
|
||||
|
||||
# set the locale
|
||||
return context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue