diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-11 09:51:00 -0400 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-09-11 09:51:00 -0400 |
| commit | bf4cc2f886c5e3096871f3b8ab050afd388d58bd (patch) | |
| tree | aab058032455b428cfe05d98ec341f84028169f2 /boot | |
| parent | fa926e876485dfe81b288ac3ee8025c2c7f59895 (diff) | |
| parent | 93280e2059c01e16c51848720d8e4d52b2c3deee (diff) | |
| download | jasper-client-bf4cc2f886c5e3096871f3b8ab050afd388d58bd.tar.gz jasper-client-bf4cc2f886c5e3096871f3b8ab050afd388d58bd.zip | |
Merge pull request #160 from alexsiri7/diagnostic
Simple diagnostic tool for Jasper
Diffstat (limited to 'boot')
| -rwxr-xr-x | boot/boot.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/boot/boot.py b/boot/boot.py index 5291ea2..8697c91 100755 --- a/boot/boot.py +++ b/boot/boot.py @@ -35,16 +35,15 @@ import traceback lib_path = os.path.abspath('../client') sys.path.append(lib_path) +from diagnose import Diagnostics import speaker as speak 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.") |
