← Back to team overview

duplicity-team team mailing list archive

[Merge] lp:~scowcron/duplicity/ftp_password_pexpect into lp:duplicity

 

Nathan Scowcroft has proposed merging lp:~scowcron/duplicity/ftp_password_pexpect into lp:duplicity.

Requested reviews:
  duplicity-team (duplicity-team)
Related bugs:
  Bug #1190724 in Duplicity: "pexpect backend does not use FTP_PASSWORD without --ssh-askpass flag"
  https://bugs.launchpad.net/duplicity/+bug/1190724

For more details, see:
https://code.launchpad.net/~scowcron/duplicity/ftp_password_pexpect/+merge/169283

Use common backend.Backend get_password() rather than _ssh_pexpect.py specific code.
-- 
https://code.launchpad.net/~scowcron/duplicity/ftp_password_pexpect/+merge/169283
Your team duplicity-team is requested to review the proposed merge of lp:~scowcron/duplicity/ftp_password_pexpect into lp:duplicity.
=== modified file 'duplicity/backends/_ssh_pexpect.py'
--- duplicity/backends/_ssh_pexpect.py	2012-09-30 12:59:44 +0000
+++ duplicity/backends/_ssh_pexpect.py	2013-06-13 19:44:38 +0000
@@ -69,15 +69,10 @@
             globals.ssh_options += " -oServerAliveInterval=%d" % ((int)(globals.timeout / 2))
         if "ServerAliveCountMax" not in globals.ssh_options:
             globals.ssh_options += " -oServerAliveCountMax=2"
+
         # set up password
-        if globals.ssh_askpass:
-            self.password = self.get_password()
-        else:
-            if parsed_url.password:
-                self.password = parsed_url.password
-                globals.ssh_askpass = True
-            else:
-                self.password = ''
+        self.use_getpass = globals.ssh_askpass
+        self.password = self.get_password()
 
     def run_scp_command(self, commandline):
         """ Run an scp command, responding to password prompts """


Follow ups