Skip to content

Commit 5f85529

Browse files
author
Kevin D Smith
committed
Remove IP address lookup
1 parent f14d33b commit 5f85529

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

swat/cas/rest/connection.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import json
2828
import os
2929
import re
30-
import socket
3130
import requests
3231
import six
3332
from six.moves import urllib
@@ -192,11 +191,7 @@ def __init__(self, hostname, port, username, password, soptions, error):
192191
self._hostname = []
193192
self._port = []
194193
for host in hostname:
195-
try:
196-
ipaddr = socket.gethostbyname(host)
197-
except Exception as exc:
198-
raise SWATError(str(exc))
199-
self._baseurl.append('%s://%s:%d' % (protocol, ipaddr, port))
194+
self._baseurl.append('%s://%s:%d' % (protocol, host, port))
200195
self._hostname.append(host)
201196
self._port.append(port)
202197

0 commit comments

Comments
 (0)