Patch by Kenneth Loafman <kenneth@loafman.com> for duplicity <= 0.4.12 to solve scp syntax
regression introduced with duplicity 0.4.12. Problem is, that user@hostname:port works, but
hostname:port doesn't any longer. This patch solves the behaviour and will be included into
the next upstream release as well. For further information, see:
- https://savannah.nongnu.org/bugs/index.php?23988
- https://bugzilla.redhat.com/show_bug.cgi?id=457680
--- duplicity-0.4.12/src/backends.py 2008-07-22 17:20:04.000000000 +0200
+++ duplicity-0.4.12/src/backends.py.scp_username 2008-08-03 19:58:35.000000000 +0200
@@ -330,8 +330,11 @@
"You can get pexpect from http://pexpect.sourceforge.net or "
"python-pexpect from your distro's repository.")
- # host string of form user@hostname:port
- self.host_string = parsed_url.username + "@" + parsed_url.hostname
+ # host string of form [user@]hostname
+ if parsed_url.username:
+ self.host_string = parsed_url.username + "@" + parsed_url.hostname
+ else:
+ self.host_string = parsed_url.hostname
# make sure remote_dir is always valid
if parsed_url.path:
# remove leading '/'