mirror of https://github.com/Mikaela/Limnoria.git
Removed useless try/except block.
This commit is contained in:
parent
a3e04ea9e8
commit
3bf798e7a4
|
@ -562,10 +562,7 @@ def getSocket(host):
|
|||
"""Returns a socket of the correct AF_INET type (v4 or v6) in order to
|
||||
communicate with host.
|
||||
"""
|
||||
try:
|
||||
host = socket.gethostbyname(host)
|
||||
except socket.error:
|
||||
raise
|
||||
host = socket.gethostbyname(host)
|
||||
if isIP(host):
|
||||
return socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
elif isIPV6(host):
|
||||
|
|
Loading…
Reference in New Issue