Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Nov 12, 2024
1 parent 7528aee commit 6479750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 3 additions & 0 deletions tosca-package/tosca/python2yaml.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 6479750

Please sign in to comment.