We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c3fa0e commit 4298f3eCopy full SHA for 4298f3e
check_internet_con.py
@@ -0,0 +1,7 @@
1
+import urllib2
2
+
3
+try:
4
+ urllib2.urlopen("http://google.com", timeout=2)
5
+ print "working connection"
6
+except urllib2.URLError:
7
+ print "No internet connection"
0 commit comments