Skip to content

Commit

Permalink
dsl: another python 3.7 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Aug 25, 2023
1 parent f157282 commit e122fdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tosca-package/tosca/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ def find_spec(cls, fullname: str, path=None, target=None):
names = fullname.split(".")
tail = names[-1]
if path:
dir_path = path[0]
try:
dir_path = path[0]
except TypeError:
# _NamespacePath missing __getitem__ on older Pythons
dir_path = path._path[0] # type: ignore
else:
dir_path = os.getcwd()
if tail == "tosca_repositories":
Expand Down

0 comments on commit e122fdd

Please sign in to comment.