module pylot.core.util.connection added: contains routines for web and network utilization

This commit is contained in:
Sebastian Wehling-Benatelli 2014-03-31 12:58:58 +02:00
parent b049dda90f
commit e6b49cfdb3

View File

@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
import urllib2
def checkurl(url='https://ariadne.geophysik.rub.de/trac/PyLoT'):
try:
urllib2.urlopen(url, timeout=1)
return True
except urllib2.URLError:
pass
return False