summaryrefslogtreecommitdiff
path: root/jasper.py
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-11 14:11:33 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-11 10:41:15 -0400
commitd7aee9421544aaff12fd4c26677085fd555d6728 (patch)
tree649f18916fdcf4bda7c85cc37e4b49fb28efda3e /jasper.py
parent52a30cae6fb11ceedfaa9cb252432a2801a2de6f (diff)
downloadjasper-client-d7aee9421544aaff12fd4c26677085fd555d6728.tar.gz
jasper-client-d7aee9421544aaff12fd4c26677085fd555d6728.zip
Added test for vocabcompiler to `--light` tests and updated travis config
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.")