Skip to content

Commit 0f0e6ae

Browse files
committed
ux: nicer error when you try to read a file type pin
1 parent a5bd2b7 commit 0f0e6ae

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pins/drivers.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ def load_data(
115115

116116
return json.load(f)
117117

118-
# elif meta.type == "file":
119-
# # TODO: update to handle multiple files
120-
# return [str(Path(f.name).absolute())]
118+
elif meta.type == "file":
119+
raise NotImplementedError(
120+
"Methods like `.pin_read()` are not able to read 'file' type pins."
121+
" Use `.pin_download()` to download the file."
122+
)
121123

122124
raise NotImplementedError(f"No driver for type {meta.type}")
123125

0 commit comments

Comments
 (0)