Skip to content

Commit d640f15

Browse files
committed
Minor error message improvement
1 parent c2efaed commit d640f15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openeo/rest/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def download_files(self, target: Union[Path, str] = None, include_stac_metadata:
408408
"""
409409
target = Path(target or Path.cwd())
410410
if target.exists() and not target.is_dir():
411-
raise OpenEoClientException("The target argument must be a folder. Got {t!r}".format(t=str(target)))
411+
raise OpenEoClientException(f"Target argument {target} exists but isn't a folder.")
412412
ensure_dir(target)
413413

414414
downloaded = [a.download(target) for a in self.get_assets()]
@@ -442,7 +442,7 @@ def download_file(self, target: Union[str, Path] = None) -> Path:
442442
def download_files(self, target: Union[str, Path] = None) -> Dict[Path, dict]:
443443
target = Path(target or Path.cwd())
444444
if target.exists() and not target.is_dir():
445-
raise OpenEoClientException("The target argument must be a folder. Got {t!r}".format(t=str(target)))
445+
raise OpenEoClientException(f"Target argument {target} exists but isn't a folder.")
446446
return {a.download(target): a.metadata for a in self.results.get_assets()}
447447

448448
def load_json(self) -> dict:

0 commit comments

Comments
 (0)