From d159fa4b1c2201ca61497b7220fa526e8e43f93d Mon Sep 17 00:00:00 2001 From: maxblan Date: Fri, 15 Mar 2024 22:38:37 +0100 Subject: [PATCH] Fix module filtering in SochaPackageBuilder class --- python/socha/utils/package_builder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/socha/utils/package_builder.py b/python/socha/utils/package_builder.py index c641748..e930cce 100644 --- a/python/socha/utils/package_builder.py +++ b/python/socha/utils/package_builder.py @@ -96,7 +96,7 @@ def _get_modules(): ) main_modules = { name for name in main_modules - if hasattr(sys.modules[name], "__file__") + if hasattr(sys.modules[name], "__file__") and sys.modules[name].__file__ is not None and (os.path.abspath(os.path.dirname(sys.modules[name].__file__)) == main_dir or os.path.abspath(os.path.dirname(sys.modules[name].__file__)).startswith(main_dir + os.path.sep)) }