From d7aee9421544aaff12fd4c26677085fd555d6728 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 11 Sep 2014 14:11:33 +0200 Subject: Added test for vocabcompiler to `--light` tests and updated travis config --- jasper.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'jasper.py') diff --git a/jasper.py b/jasper.py index a04216d..f23c18c 100755 --- a/jasper.py +++ b/jasper.py @@ -7,6 +7,7 @@ import traceback import shutil import yaml +from diagnose import Diagnostics from client import vocabcompiler, stt from client import speaker as speak from client.conversation import Conversation @@ -45,11 +46,9 @@ os.environ["PATH"] = path speaker = speak.newSpeaker() def testConnection(): - try: - urllib2.urlopen("http://www.google.com").getcode() + if Diagnostics.check_network_connection(): print "CONNECTED TO INTERNET" - - except urllib2.URLError: + else: print "COULD NOT CONNECT TO NETWORK" speaker.say( "Warning: I was unable to connect to a network. Parts of the system may not work correctly, depending on your setup.") -- cgit v1.3.1