Removed useless try/except block.

This commit is contained in:
Jeremy Fincher 2004-07-31 00:47:08 +00:00
parent a3e04ea9e8
commit 3bf798e7a4

View File

@ -562,10 +562,7 @@ def getSocket(host):
"""Returns a socket of the correct AF_INET type (v4 or v6) in order to """Returns a socket of the correct AF_INET type (v4 or v6) in order to
communicate with host. communicate with host.
""" """
try: host = socket.gethostbyname(host)
host = socket.gethostbyname(host)
except socket.error:
raise
if isIP(host): if isIP(host):
return socket.socket(socket.AF_INET, socket.SOCK_STREAM) return socket.socket(socket.AF_INET, socket.SOCK_STREAM)
elif isIPV6(host): elif isIPV6(host):