forked from github/pelican
settings: Use splitext to remove extensions, not rpartition
This commit is contained in:
parent
e5e455e0e5
commit
a5c1fdac58
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue