utils.Helpers: changing back is_reachable() to a socket connection
@@ -71,11 +71,9 @@ def is_reachable(ip=None):
if not is_valid_string(ip):
return False
try:
- r = requests.get(ip)
- if r.status_code == 200:
+ socket.inet_aton(ip)
return True
- return False
- except Exception as err:
+ except socket.error:
return False
