From: Raymond Hettinger Date: Wed, 23 Apr 2003 18:59:54 +0000 (+0000) Subject: SF 557704: netrc module can't handle all passwords X-Git-Tag: v2.3c1~1063 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6eca358695cb8bf51a5632d5aa3a585802b77732;p=thirdparty%2FPython%2Fcpython.git SF 557704: netrc module can't handle all passwords Expanded the range of allowable characters to include ascii punctuation. Allows resource files to have a larger character set for passwords. (Idea contributed by Bram Moolenaar.) --- diff --git a/Lib/netrc.py b/Lib/netrc.py index 316a66c8867d..1d65dbeb895b 100644 --- a/Lib/netrc.py +++ b/Lib/netrc.py @@ -30,8 +30,7 @@ class netrc: self.hosts = {} self.macros = {} lexer = shlex.shlex(fp) - # Allows @ in hostnames. Not a big deal... - lexer.wordchars = lexer.wordchars + '.-@' + lexer.wordchars += r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" while 1: # Look for a machine, default, or macdef top-level keyword toplevel = tt = lexer.get_token()