From a5c1fdac58cea8d408a1e36284173004944ed0f0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 4 Jan 2013 15:09:47 -0500 Subject: [PATCH] settings: Use splitext to remove extensions, not rpartition --- pelican/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/settings.py b/pelican/settings.py index ac773c17..834b90af 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -127,7 +127,7 @@ def get_settings_from_module(module=None, default_settings=_DEFAULT_CONFIG): def get_settings_from_file(path, default_settings=_DEFAULT_CONFIG): """Loads settings from a file path, returning a dict.""" - name = os.path.basename(path).rpartition('.')[0] + name, ext = os.path.splitext(os.path.basename(path)) module = imp.load_source(name, path) return get_settings_from_module(module, default_settings=default_settings)