Closed duboism closed 4 years ago
Errors raised by cURL in CurlDownload.list() are not caught and the function returns an empty list. This may lead to hard to understand errors later in the workflow.
cURL
CurlDownload.list()
For instance, trying to access non-existing location:
>>> sftpd = CurlDownload(curl_protocol="sftp", host="test.rebex.net", rootdir="/toto") >>> sftpd.set_credentials("demo:password") >>> sftpd.list() ([], [])
Using curl for similar operation leads to an error:
curl
$ curl -u demo:password sftp://test.rebex.net/toto curl: (78) Could not open remote file for reading: SFTP server: Path not found. $ echo $? 78
Similarly, using a wrong password is not detected:
>>> sftpd = CurlDownload(curl_protocol="sftp", host="test.rebex.net", rootdir="/") >>> sftpd.set_credentials("demo:badpassword") >>> sftpd.list() ([], [])
Using curl:
$ curl -u demo:badpassword sftp://test.rebex.net/ curl: (67) Authentication failure $ echo $? 67
Based on examples in PR #30 this is closed now.
Errors raised by
cURL
inCurlDownload.list()
are not caught and the function returns an empty list. This may lead to hard to understand errors later in the workflow.For instance, trying to access non-existing location:
Using
curl
for similar operation leads to an error:Similarly, using a wrong password is not detected:
Using
curl
: