summaryrefslogtreecommitdiff
path: root/jasper.py
diff options
context:
space:
mode:
Diffstat (limited to 'jasper.py')
-rwxr-xr-xjasper.py7
1 files changed, 3 insertions, 4 deletions
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.")