Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👌
SshTransport
: Return FileNotFoundError
if destination parent do…
…es not exist In 101a8d6 the engine was adapted to simply log a warning in case a `FileNotFoundError` was raised by a remove copy operation. The logic is that in case the source file does not exist this operation will fail every time. Hence, it is not useful to trigger the exponential backoff mechanism and have this operation fail multiple times. However, when the parent folder of the target doesn't exist the remote copy command will fail as well. In this case, the returned error was still an `OSError`, which is not caught by the engine and logged as a warning. To obtain similar behaviour for these two failures, we now parse the `stderr` returned by the `exec_command_wait_bytes` method. In case it refers to a file or directory not being found, we raise a `FileNoteFoundError` instead of a generic `OSError`. Since this also deals with the case of a missing remote source file, we remove the check in the `SshTransport.copy()` method.
- Loading branch information