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.

classification
Title: netrc throws NetrcParseError for record without 'password'
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4
process
Status: open Resolution:
Dependencies: 28806 Superseder:
Assigned To: Nosy List: Mark Wood
Priority: normal Keywords:

Created on 2016-11-23 16:18 by Mark Wood, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg281567 - (view) Author: Mark Wood (Mark Wood) Date: 2016-11-23 16:18
netrc.netrc() throws a NetrcParseError if ~/.netrc contains an entry witout a 'password' field.  Other users of .netrc do not do this.  In my case, I have entries for sftp hosts which will use public-key authentication instead of a password.

What I would suggest is that if any or all of 'login', 'account', and 'password' are omitted, simply accept that and store a 0-length string.

Someone on StackOverflow says he has rewritten netrc to fix various problems but doesn't know how to contribute it.  http://stackoverflow.com/questions/28754547/python-netrc-error-on-file-with-comment
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72966
2016-11-26 11:15:20xiang.zhangsetdependencies: + Improve the netrc library
2016-11-23 16:18:23Mark Woodcreate