Skip to content

Commit

Permalink
3.6.0b8 - Fixed loading of local modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Dec 11, 2020
1 parent 191c3d2 commit 8a042a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bsb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "3.6.0b7"
__version__ = "3.6.0b8"

from .reporting import set_verbosity, report, warn
4 changes: 4 additions & 0 deletions bsb/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ def get_configurable_class(configured_class_name):
if module_name == "":
module_dict = globals()
else:
import os, sys

sys.path.insert(0, os.getcwd())
module_ref = __import__(module_name, globals(), locals(), [class_name], 0)
sys.path = sys.path[1:]
module_dict = module_ref.__dict__
if not class_name in module_dict:
raise ConfigurableClassNotFoundError("Class not found: " + configured_class_name)
Expand Down

0 comments on commit 8a042a4

Please sign in to comment.