Merge lp:~ed.so/duplicity/lftp.netrc into lp:duplicity/0.6

Proposed by edso
Status: Merged
Merged at revision: 896
Proposed branch: lp:~ed.so/duplicity/lftp.netrc
Merge into: lp:duplicity/0.6
Diff against target: 14 lines (+3/-1)
1 file modified
duplicity/backends/ftpsbackend.py (+3/-1)
To merge this branch: bzr merge lp:~ed.so/duplicity/lftp.netrc
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+134788@code.launchpad.net

Description of the change

allow .netrc auth for lftp backend

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'duplicity/backends/ftpsbackend.py'
2--- duplicity/backends/ftpsbackend.py 2012-02-12 13:28:10 +0000
3+++ duplicity/backends/ftpsbackend.py 2012-11-17 22:18:20 +0000
4@@ -80,7 +80,9 @@
5 os.write(self.tempfile, "set net:max-retries %s\n" % globals.num_retries)
6 os.write(self.tempfile, "set ftp:passive-mode %s\n" % self.conn_opt)
7 os.write(self.tempfile, "open %s %s\n" % (self.portflag, self.parsed_url.hostname))
8- os.write(self.tempfile, "user %s %s\n" % (self.parsed_url.username, self.password))
9+ # allow .netrc auth by only setting user/pass when user was actually given
10+ if self.parsed_url.username:
11+ os.write(self.tempfile, "user %s %s\n" % (self.parsed_url.username, self.password))
12 os.close(self.tempfile)
13
14 self.flags = "-f %s" % self.tempname

Subscribers

People subscribed via source and target branches

to all changes: