[Python-checkins] python/dist/src/Lib netrc.py,1.16,1.17

rhettinger@users.sourceforge.net rhettinger@users.sourceforge.net
Wed, 23 Apr 2003 11:59:58 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv9877

Modified Files:
	netrc.py 
Log Message:
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.)



Index: netrc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/netrc.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** netrc.py	1 Jun 2002 16:07:16 -0000	1.16
--- netrc.py	23 Apr 2003 18:59:54 -0000	1.17
***************
*** 31,36 ****
          self.macros = {}
          lexer = shlex.shlex(fp)
!         # Allows @ in hostnames.  Not a big deal...
!         lexer.wordchars = lexer.wordchars + '.-@'
          while 1:
              # Look for a machine, default, or macdef top-level keyword
--- 31,35 ----
          self.macros = {}
          lexer = shlex.shlex(fp)
!         lexer.wordchars += r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
          while 1:
              # Look for a machine, default, or macdef top-level keyword