diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-15 00:50:52 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-15 00:50:52 (GMT) |
commit | 2344fae6d003f5a5dde8016e1d2310e161288708 (patch) | |
tree | 296a67c9d61f6f0a32796e7404e71fdf7d1a1fd2 /Lib/netrc.py | |
parent | fa25a7d51fdc4c21ac569d9f62825e337a7a6b4a (diff) | |
download | cpython-2344fae6d003f5a5dde8016e1d2310e161288708.zip cpython-2344fae6d003f5a5dde8016e1d2310e161288708.tar.gz cpython-2344fae6d003f5a5dde8016e1d2310e161288708.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/netrc.py')
-rw-r--r-- | Lib/netrc.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/netrc.py b/Lib/netrc.py index 679669f..6bc0292 100644 --- a/Lib/netrc.py +++ b/Lib/netrc.py @@ -1,6 +1,6 @@ """An object-oriented interface to .netrc files.""" -# Module and documentation by Eric S. Raymond, 21 Dec 1998 +# Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex @@ -12,7 +12,7 @@ class netrc: self.hosts = {} self.macros = {} lexer = shlex.shlex(fp) - # Allows @ in hostnames. Not a big deal... + # Allows @ in hostnames. Not a big deal... lexer.wordchars = lexer.wordchars + '.-@' while 1: # Look for a machine, default, or macdef top-level keyword @@ -23,7 +23,7 @@ class netrc: entryname = lexer.get_token() elif tt == 'default': entryname = 'default' - elif tt == 'macdef': # Just skip to end of macdefs + elif tt == 'macdef': # Just skip to end of macdefs entryname = lexer.get_token() self.macros[entryname] = [] lexer.whitepace = ' \t' @@ -36,7 +36,7 @@ class netrc: self.macros[entryname].append(line) else: raise SyntaxError, "bad toplevel token %s, file %s, line %d" \ - % (tt, file, lexer.lineno) + % (tt, file, lexer.lineno) # We're looking at start of an entry for a named machine or default. if toplevel == 'machine': @@ -87,6 +87,5 @@ class netrc: rep = rep + "\n" return rep -if __name__ == '__main__': +if __name__ == '__main__': print netrc() - |