[New-bugs-announce] [issue11416] netrc module does not handle multiple entries for a single host
saffroy
report at bugs.python.org
Sun Mar 6 22:14:07 CET 2011
New submission from saffroy <saffroy at gmail.com>:
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.
----------
components: Library (Lib)
messages: 130193
nosy: saffroy
priority: normal
severity: normal
status: open
title: netrc module does not handle multiple entries for a single host
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11416>
_______________________________________
More information about the New-bugs-announce
mailing list