We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4807f21 commit 7afd331Copy full SHA for 7afd331
src/lighthouseweb3/__init__.py
@@ -33,6 +33,8 @@ def uploadBlob(self, source: io.BufferedReader, filename: str) -> t.Upload:
33
:param source: str, path to file or directory
34
:return: t.Upload, the upload result
35
"""
36
+ if not (hasattr(source, 'read') and hasattr(source, 'close')):
37
+ raise TypeError("source must have 'read' and 'close' methods")
38
try:
39
return d.uploadBlob(source, filename, self.token)
40
except Exception as e:
0 commit comments