Skip to content

Commit

Permalink
Don't record imported modules in sys.modules on auto-traverse
Browse files Browse the repository at this point in the history
  • Loading branch information
subhashb committed Oct 18, 2019
1 parent 4c7e69a commit 815ee0e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/protean/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@ def init(self):
import inspect
import os
import pathlib
import sys

domain_path = inspect.stack()[1][1]
dir_name = pathlib.PurePath(pathlib.Path(domain_path).resolve()).parent
Expand Down Expand Up @@ -260,7 +259,6 @@ def init(self):
spec = importlib.util.spec_from_file_location(file_module_name, full_file_path)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
sys.modules[spec.name] = module
logger.debug(f'Loaded {file_module_name}')
except ModuleNotFoundError as exc:
logger.debug(f'Error while autoloading modules: {exc}')
Expand Down

0 comments on commit 815ee0e

Please sign in to comment.