diff options
Diffstat (limited to 'jasper.py')
| -rwxr-xr-x | jasper.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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.") |
