summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-03 21:04:55 (GMT)
committerGeorg Brandl <georg@python.org>2009-01-03 21:04:55 (GMT)
commit7044b11818cb81d1df0573b3cfe8d9b90befce9b (patch)
tree0197d5c9c583b486559a4258e6719984629e9dcd /Doc/library/socket.rst
parentc62ef8b4d9648c36218cb0142a6395a00c11885e (diff)
downloadcpython-7044b11818cb81d1df0573b3cfe8d9b90befce9b.zip
cpython-7044b11818cb81d1df0573b3cfe8d9b90befce9b.tar.gz
cpython-7044b11818cb81d1df0573b3cfe8d9b90befce9b.tar.bz2
Remove tabs from the documentation.
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst33
1 files changed, 17 insertions, 16 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index e8c2d53..4f2a32e 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -852,20 +852,21 @@ sends traffic to the first one connected successfully. ::
HOST = None # Symbolic name meaning all available interfaces
PORT = 50007 # Arbitrary non-privileged port
s = None
- for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
+ for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC,
+ socket.SOCK_STREAM, 0, socket.AI_PASSIVE):
af, socktype, proto, canonname, sa = res
try:
- s = socket.socket(af, socktype, proto)
+ s = socket.socket(af, socktype, proto)
except socket.error, msg:
- s = None
- continue
+ s = None
+ continue
try:
- s.bind(sa)
- s.listen(1)
+ s.bind(sa)
+ s.listen(1)
except socket.error, msg:
- s.close()
- s = None
- continue
+ s.close()
+ s = None
+ continue
break
if s is None:
print 'could not open socket'
@@ -890,16 +891,16 @@ sends traffic to the first one connected successfully. ::
for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
- s = socket.socket(af, socktype, proto)
+ s = socket.socket(af, socktype, proto)
except socket.error, msg:
- s = None
- continue
+ s = None
+ continue
try:
- s.connect(sa)
+ s.connect(sa)
except socket.error, msg:
- s.close()
- s = None
- continue
+ s.close()
+ s = None
+ continue
break
if s is None:
print 'could not open socket'