diff options
author | Guido van Rossum <guido@python.org> | 2001-01-13 16:55:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-01-13 16:55:33 (GMT) |
commit | b2825205a28e743a10574d4b8df84241d98650ae (patch) | |
tree | 3f31373e9d4da9b5cfdb3a1a49b2e21482a87e22 /Lib/httplib.py | |
parent | f6f3a89fbd8b636da584ff7983e7b4fccfb13759 (diff) | |
download | cpython-b2825205a28e743a10574d4b8df84241d98650ae.zip cpython-b2825205a28e743a10574d4b8df84241d98650ae.tar.gz cpython-b2825205a28e743a10574d4b8df84241d98650ae.tar.bz2 |
SF Patch #103225 by Ping: httplib: smallest Python patch ever
The ASCII-art diagram at the top of httplib contains a backslash at
the end of a line, which causes Python to remove the newline. This
one-character patch adds a space after the backslash so it will
appear at the end of the line in the docstring as intended.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r-- | Lib/httplib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py index 3e79217..17ca268 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py @@ -25,7 +25,7 @@ request. This diagram details these state transitions: v Unread-response [Response-headers-read] |\____________________ - | \ + | \ | response.read() | putrequest() v v Idle Req-started-unread-response @@ -332,7 +332,10 @@ class HTTPConnection: if port is None: i = host.find(':') if i >= 0: - port = int(host[i+1:]) + try: + port = int(host[i+1:]) + except ValueError, msg: + raise socket.error, str(msg) host = host[:i] else: port = self.default_port |