Dot character has special meaning in module names

Therefore we esacpe it using the underscore character.
This commit is contained in:
Christian Mäder 2020-10-18 02:50:51 +02:00
parent 20820e10c2
commit 16b567939c
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ with scandir(_CONFIG_DIR) as it:
if f.name == f'{_MAIN_CONFIG}.py':
continue
module_name = f"{_MODULE}.{f.name[:-len('.py')]}"
module_name = f"{_MODULE}.{f.name[:-len('.py')]}".replace(".", "_")
_import(module_name, f.path)

View File

@ -53,7 +53,7 @@ with scandir(_CONFIG_DIR) as it:
if f.name == f'{_MAIN_CONFIG}.py':
continue
module_name = f"{_MODULE}.{f.name[:-len('.py')]}"
module_name = f"{_MODULE}.{f.name[:-len('.py')]}".replace(".", "_")
_import(module_name, f.path)