Compare commits
2 Commits
d5ac5cd427
...
0e5685d5ea
Author | SHA1 | Date | |
---|---|---|---|
0e5685d5ea | |||
6a2810f603 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -161,3 +161,4 @@ cython_debug/
|
|||||||
|
|
||||||
# mdrs-cli
|
# mdrs-cli
|
||||||
.neurodatacli.config
|
.neurodatacli.config
|
||||||
|
poetry.toml
|
@ -145,6 +145,9 @@ class DownloadCommand(BaseCommand):
|
|||||||
try:
|
try:
|
||||||
file_api.download(info.file, info.path)
|
file_api.download(info.file, info.path)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
print(f"Failed: ${info.path}")
|
||||||
|
if os.path.isfile(info.path):
|
||||||
|
os.remove(info.path)
|
||||||
return False
|
return False
|
||||||
print(info.path)
|
print(info.path)
|
||||||
return True
|
return True
|
||||||
|
@ -2,7 +2,7 @@ import configparser
|
|||||||
import os
|
import os
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
import validators # type: ignore
|
import validators
|
||||||
|
|
||||||
from mdrsclient.exceptions import IllegalArgumentException
|
from mdrsclient.exceptions import IllegalArgumentException
|
||||||
from mdrsclient.settings import CONFIG_DIRNAME
|
from mdrsclient.settings import CONFIG_DIRNAME
|
||||||
@ -41,7 +41,7 @@ class ConfigFile:
|
|||||||
|
|
||||||
@url.setter
|
@url.setter
|
||||||
def url(self, url: str) -> None:
|
def url(self, url: str) -> None:
|
||||||
if not validators.url(url): # type: ignore
|
if not validators.url(url):
|
||||||
raise IllegalArgumentException("malformed URI sequence")
|
raise IllegalArgumentException("malformed URI sequence")
|
||||||
self.__load()
|
self.__load()
|
||||||
if self.__config.has_section(self.remote):
|
if self.__config.has_section(self.remote):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "mdrs-client-python"
|
name = "mdrs-client-python"
|
||||||
version = "1.3.9"
|
version = "1.3.10"
|
||||||
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"
|
||||||
@ -26,10 +26,10 @@ python = "^3.10"
|
|||||||
requests = "^2.32.3"
|
requests = "^2.32.3"
|
||||||
requests-toolbelt = "^1.0.0"
|
requests-toolbelt = "^1.0.0"
|
||||||
python-dotenv = "^1.0.1"
|
python-dotenv = "^1.0.1"
|
||||||
pydantic = "^2.9.2"
|
pydantic = "^2.10.4"
|
||||||
pydantic-settings = "^2.6.0"
|
pydantic-settings = "^2.7.0"
|
||||||
PyJWT = "^2.9.0"
|
PyJWT = "^2.10.1"
|
||||||
validators = "^0.33.0"
|
validators = "^0.34.0"
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
black = "^24.10.0"
|
black = "^24.10.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user