all test pass

This commit is contained in:
Mario Rodas 2011-07-02 15:15:21 -05:00
commit dc6934be43
5 changed files with 61 additions and 12 deletions

View file

@ -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