diff --git a/tests/test_packages.py b/tests/test_packages.py index c9ba340b..61db7dd0 100644 --- a/tests/test_packages.py +++ b/tests/test_packages.py @@ -163,7 +163,7 @@ def test_remote_tags(): package_rules_envvar = "gitlab.com/onecommons/* unfurl.cloud/onecommons/*" runner = CliRunner() try: - UNFURL_PACKAGE_RULES = os.environ.get("UNFURL_PACKAGE_RULES") + # UNFURL_PACKAGE_RULES = os.environ.get("UNFURL_PACKAGE_RULES") with runner.isolated_filesystem(): os.environ["UNFURL_PACKAGE_RULES"] = package_rules_envvar result = runner.invoke( diff --git a/tosca-package/tosca/python2yaml.py b/tosca-package/tosca/python2yaml.py index cc090e30..37dbe97c 100644 --- a/tosca-package/tosca/python2yaml.py +++ b/tosca-package/tosca/python2yaml.py @@ -1,6 +1,7 @@ # Copyright (c) 2023 Adam Souzis # SPDX-License-Identifier: MIT import importlib.util, importlib._bootstrap +import time import io import inspect from types import ModuleType @@ -261,6 +262,8 @@ def _imported_module2yaml(self, module: ModuleType) -> Path: base_dir = "/".join( path.parts[1 : -len(module.__name__.split("."))] ) + if not os.path.isfile(path): + time.sleep(2) with open(path) as sf: src = sf.read() namespace: dict = dict(__file__=str(path))