I've done a fair bit of work to optimise away a whole bunch of round trips over sftp. For example, renaming a file over sftp can fail, if the target name already exists. So we try to remove it first. The pretty way of doing that would be to check if the target exists before trying to remove it. However, that would mean an extra round trip, when the target does exist.

Pretty:

1. does target exist?
2. if it exists, remove
3. rename

Ugly:

1. try to remove target, and ignore a failure due to target not
   existing
2. rename

Unfortunately, doing things the ugly way results in the log file containing a lot of tracebacks from paramiko. They're benign, but they look scary, and they fill the log with useless text.

Reported-By: Jordi Marqués

Could obnam just catch the exception and therefore stop the scary tracebacks from appearing in the logfile? - Andrew Ruthven

This is fixed now. It was a problem with Obnam debugging output, not paramiko's fault at all. --liw done