module pylot.core.util.connection added: contains routines for web and network utilization
This commit is contained in:
parent
b049dda90f
commit
e6b49cfdb3
12
pylot/core/util/connection.py
Normal file
12
pylot/core/util/connection.py
Normal 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
|
Loading…
Reference in New Issue
Block a user