Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c8b16939d7
|
|||
0d8deb02d7
|
|||
c2a67aa861
|
@ -1 +1 @@
|
||||
1.3.4
|
||||
1.3.5
|
||||
|
@ -47,8 +47,7 @@ class FilesApi(BaseApi):
|
||||
except MemoryError:
|
||||
raise UnexpectedException("Out of memory.")
|
||||
except Exception as e:
|
||||
print(e)
|
||||
raise UnexpectedException(e)
|
||||
raise UnexpectedException("Unspecified error.") from e
|
||||
return ret.id
|
||||
|
||||
def update(self, file: File, path: str | None) -> bool:
|
||||
@ -66,6 +65,8 @@ class FilesApi(BaseApi):
|
||||
raise UnexpectedException(f"Could not open `{path}` file.")
|
||||
except MemoryError:
|
||||
raise UnexpectedException("Out of memory.")
|
||||
except Exception as e:
|
||||
raise UnexpectedException("Unspecified error.") from e
|
||||
else:
|
||||
# update metadata
|
||||
data = {"name": file.name, "description": file.description}
|
||||
@ -110,6 +111,7 @@ class FilesApi(BaseApi):
|
||||
def download(self, file: File, path: str) -> bool:
|
||||
# print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name)
|
||||
url = file.download_url
|
||||
token_check(self.connection)
|
||||
response = self.connection.get(url, stream=True)
|
||||
self._raise_response_error(response)
|
||||
try:
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "mdrs-client-python"
|
||||
version = "1.3.4"
|
||||
version = "1.3.5"
|
||||
description = "The mdrs-client-python is python library and a command-line client for up- and downloading files to and from MDRS based repository."
|
||||
authors = ["Yoshihiro OKUMURA <yoshihiro.okumura@riken.jp>"]
|
||||
license = "MIT"
|
||||
|
Reference in New Issue
Block a user