diff --git a/clients/client-linux.py b/clients/client-linux.py index b4ad4b7a..c28435ad 100755 --- a/clients/client-linux.py +++ b/clients/client-linux.py @@ -151,10 +151,10 @@ def get_network(ip_version): HOST = "ipv6.google.com" try: s = socket.create_connection((HOST, 80), 2) + s.close() return True except: - pass - return False + return False lostRate = { '10010': 0.0, diff --git a/clients/client-psutil.py b/clients/client-psutil.py index f0544265..77dee211 100755 --- a/clients/client-psutil.py +++ b/clients/client-psutil.py @@ -119,10 +119,10 @@ def get_network(ip_version): HOST = "ipv6.google.com" try: s = socket.create_connection((HOST, 80), 2) + s.close() return True except: - pass - return False + return False lostRate = { '10010': 0.0,