From ac0b1a6f823777174a26d9ae402d9ae0b1a730c2 Mon Sep 17 00:00:00 2001 From: derdon Date: Mon, 13 Jun 2011 01:25:29 +0200 Subject: [PATCH 1/2] check only paths (i.e. not None) for being absolute when reading the settings --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index bc866494..356de1b4 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -77,7 +77,7 @@ def read_settings(filename): # Make the paths relative to the settings file for path in ['PATH', 'OUTPUT_PATH']: if path in context: - if not os.path.isabs(context[path]): + if 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 From 128867630252e05f3d557383a1b7539e7a78893c Mon Sep 17 00:00:00 2001 From: derdon Date: Mon, 13 Jun 2011 01:34:36 +0200 Subject: [PATCH 2/2] check the actual value in the settings --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index 356de1b4..1b32395c 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -77,7 +77,7 @@ def read_settings(filename): # Make the paths relative to the settings file for path in ['PATH', 'OUTPUT_PATH']: if path in context: - if path is not None and not os.path.isabs(context[path]): + 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