mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
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
|
"""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):
|
||||||
|
Loading…
Reference in New Issue
Block a user