We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2312e15 + 4298f3e commit 251b14eCopy full SHA for 251b14e
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