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:
|
except MemoryError:
|
||||||
raise UnexpectedException("Out of memory.")
|
raise UnexpectedException("Out of memory.")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
raise UnexpectedException("Unspecified error.") from e
|
||||||
raise UnexpectedException(e)
|
|
||||||
return ret.id
|
return ret.id
|
||||||
|
|
||||||
def update(self, file: File, path: str | None) -> bool:
|
def update(self, file: File, path: str | None) -> bool:
|
||||||
@ -66,6 +65,8 @@ class FilesApi(BaseApi):
|
|||||||
raise UnexpectedException(f"Could not open `{path}` file.")
|
raise UnexpectedException(f"Could not open `{path}` file.")
|
||||||
except MemoryError:
|
except MemoryError:
|
||||||
raise UnexpectedException("Out of memory.")
|
raise UnexpectedException("Out of memory.")
|
||||||
|
except Exception as e:
|
||||||
|
raise UnexpectedException("Unspecified error.") from e
|
||||||
else:
|
else:
|
||||||
# update metadata
|
# update metadata
|
||||||
data = {"name": file.name, "description": file.description}
|
data = {"name": file.name, "description": file.description}
|
||||||
@ -110,6 +111,7 @@ class FilesApi(BaseApi):
|
|||||||
def download(self, file: File, path: str) -> bool:
|
def download(self, file: File, path: str) -> bool:
|
||||||
# print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name)
|
# print(self.__class__.__name__ + "::" + sys._getframe().f_code.co_name)
|
||||||
url = file.download_url
|
url = file.download_url
|
||||||
|
token_check(self.connection)
|
||||||
response = self.connection.get(url, stream=True)
|
response = self.connection.get(url, stream=True)
|
||||||
self._raise_response_error(response)
|
self._raise_response_error(response)
|
||||||
try:
|
try:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "mdrs-client-python"
|
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."
|
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>"]
|
authors = ["Yoshihiro OKUMURA <yoshihiro.okumura@riken.jp>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
Reference in New Issue
Block a user