Skip to content

Commit

Permalink
Fixed load vtl to create path from string.
Browse files Browse the repository at this point in the history
  • Loading branch information
javihern98 committed Oct 1, 2024
1 parent 612203c commit 2fd53db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/vtlengine/API/_InternalApi.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,10 @@ def load_vtl(input: Union[str, Path]):
the file.
"""
if isinstance(input, str):
try:
test = Path(input)
except Exception:
if os.path.exists(input):
input = Path(input)
else:
return input
input = test
if not isinstance(input, Path):
raise Exception('Invalid vtl file. Input is not a Path object')
if not input.exists():
Expand Down

0 comments on commit 2fd53db

Please sign in to comment.