This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author saffroy
Recipients saffroy
Date 2011-03-06.21:14:07
SpamBayes Score 4.7597728e-06
Marked as misclassified No
Message-id <1299446047.69.0.767438398088.issue11416@psf.upfronthosting.co.za>
In-reply-to
Content
I have a netrc file with two entries for the same host. The netrc module only returns the last entry.

$ cat > .netrc
machine host.com
        login foo
        password foo

machine host.com
        login bar
        password bar

$ python -c 'import netrc; print netrc.netrc()'
machine host.com
        login 'bar'
        password 'bar'

My Linux ftp clients (ftp, lftp) always use the first entry for a given host. Also lftp can use the password from the proper entry if I supply the host and login.

With the netrc module in Python 2.6.6 (as tested on Debian Squeeze), I can only retrieve the last entry.
History
Date User Action Args
2011-03-06 21:14:07saffroysetrecipients: + saffroy
2011-03-06 21:14:07saffroysetmessageid: <1299446047.69.0.767438398088.issue11416@psf.upfronthosting.co.za>
2011-03-06 21:14:07saffroylinkissue11416 messages
2011-03-06 21:14:07saffroycreate