mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +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
|
||||
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
Block a user