Skip to content

Commit 251b14e

Browse files
committed
Merge pull request geekcomputers#43 from daxeel/master
Create check_internet_con.py
2 parents 2312e15 + 4298f3e commit 251b14e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

check_internet_con.py

+7
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)