--- /c/Python278/Lib/netrc.py-orig 2014-10-09 13:52:36.995286000 +0100 +++ /c/Python278/Lib/netrc.py 2014-10-09 13:53:05.041286000 +0100 @@ -111,7 +111,23 @@ "~/.netrc access too permissive: access" " permissions must restrict access to only" " the owner", file, lexer.lineno) - password = lexer.get_token() + # handle passwords with quoted spaces + quote_chars = lexer.quotes + removed_chars = [] + for quote_char in quote_chars: + if quote_char in lexer.wordchars: + lexer.wordchars = lexer.wordchars.replace(quote_char, '') + removed_chars.append(quote_char) + try: + + password = lexer.get_token() + + for quote_char in quote_chars: + if password.startswith(quote_char) and password.endswith(quote_char): + password = password[1:-1] + finally: + for removed_char in removed_chars: + lexer.wordchars += removed_char else: raise NetrcParseError("bad follower token %r" % tt, file, lexer.lineno)