From 93280e2059c01e16c51848720d8e4d52b2c3deee Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 11 Sep 2014 06:48:13 +0100 Subject: Using Diagnostics internet connection check in boot.py and test.py --- client/test.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'client') diff --git a/client/test.py b/client/test.py index a8f12be..9f23e00 100644 --- a/client/test.py +++ b/client/test.py @@ -13,6 +13,7 @@ from urllib2 import URLError, urlopen import test_mic import g2p import brain +from diagnose import Diagnostics DEFAULT_PROFILE = { 'prefers_email': False, @@ -23,11 +24,7 @@ DEFAULT_PROFILE = { def activeInternet(): - try: - urlopen('http://www.google.com', timeout=1) - return True - except URLError: - return False + return Diagnostics.check_network_connection() class TestMic(unittest.TestCase): -- cgit v1.3.1