diff --git a/pylot/core/util/connection.py b/pylot/core/util/connection.py new file mode 100644 index 00000000..4f99ab81 --- /dev/null +++ b/pylot/core/util/connection.py @@ -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