[issue11416] netrc module does not handle multiple entries for a single host

saffroy report at bugs.python.org
Sat Mar 12 17:04:08 CET 2011


saffroy <saffroy at gmail.com> added the comment:

I could spend some time on a small patch.

Here are the changes I would consider:
- netrc.authenticators() could return the first entry matching a given host (now it returns the last)
- it could also accept an extra parameter (with default=None), a login to select the right account/password for a given host
- it could also return a list of entries (tuples) matching the supplied host (now it always returns only one tuple), or a new method could do that

IMHO the last change would make the overall behaviour more consistent (BTW note the plural for "authenticators"), but it could also break existing apps.

Comments?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11416>
_______________________________________


More information about the Python-bugs-list mailing list