paramiko-tutorial
paramiko-tutorial copied to clipboard
change finally to else
When returning a value in finally, the potentially raised error in the except is never handled: (https://stackoverflow.com/questions/53435114/python-exception-not-raised-if-finally-returns-value).
To achieve what apparently was aimed for, the else block should be used (which does makes sense when reading the uploaded
log message "f'Uploaded {file} to {self.remote_path}").