Skip to content

Commit 7c1c34e

Browse files
authored
fix: safe_path check always operates on str (#603)
1 parent babae17 commit 7c1c34e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

renku/cli/_graph.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161

6262
def _safe_path(filepath, can_be_cwl=False):
6363
"""Check if the path should be used in output."""
64+
if isinstance(filepath, Path):
65+
filepath = str(filepath)
66+
6467
# Should not be in ignore paths.
6568
if filepath in {'.gitignore', '.gitattributes'}:
6669
return False

renku/models/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,4 +464,4 @@ def __attrs_post_init__(self):
464464
self._label = self.identifier
465465

466466
if not self.path:
467-
self.path = self.client.renku_datasets_path / str(self.uid)
467+
self.path = str(self.client.renku_datasets_path / str(self.uid))

0 commit comments

Comments
 (0)