diff --git a/Lib/netrc.py b/Lib/netrc.py index 1d65dbeb895..5493d77d3e8 100644 --- a/Lib/netrc.py +++ b/Lib/netrc.py @@ -56,13 +56,14 @@ def __init__(self, file=None): "bad toplevel token %r" % tt, file, lexer.lineno) # We're looking at start of an entry for a named machine or default. - login = account = password = None + login = '' + account = password = None self.hosts[entryname] = {} while 1: tt = lexer.get_token() if (tt=='' or tt == 'machine' or tt == 'default' or tt =='macdef'): - if login and password: + if password: self.hosts[entryname] = (login, account, password) lexer.push_token(tt) break