[Python-Dev] netrc.py

Skip Montanaro skip@pobox.com
Thu, 24 Apr 2003 13:37:20 -0500

>>>>> "Raymond" == Raymond Hettinger <raymond.hettinger@verizon.net> writes:

    Raymond> Bram Moolenaar 
    >> > Please at least do not produce the NetrcParseError when the
    >> > "login" field is omitted.  This can be done by changing the
    >> > "else:" above "malformed %s entry" to "elif not password:".
    >> >  That is the minimal change to make this module work on my
    >> > system.

    Raymond> Bram is requesting netrc.py be modified to exclude entries
    Raymond> without a login field.  An example use case is for mail
    Raymond> servers:

    Raymond>     machine mail          password fruit

    Raymond> If the change is made, the line won't be handled at all.  It
    Raymond> would be silently skipped.  Currently is raises a
    Raymond> NetrcParseError.

Why not have it add an entry to self.hosts with an empty string associated
with the 'login' key?