]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport 1.17 adding punctuation as allowable characters
authorRaymond Hettinger <python@rcn.com>
Wed, 23 Apr 2003 19:37:42 +0000 (19:37 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 23 Apr 2003 19:37:42 +0000 (19:37 +0000)
Lib/netrc.py

index 294399d35b0b98b97d70f1c17807b3ff1755bfdf..5c9e1ff5217f79b1be9a6b971725da6408bb5a60 100644 (file)
@@ -27,8 +27,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()