environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/web.py
def check_url_accessibility(url, timeout=10):       
    '''
    Check whether the URL accessible and returns HTTP 200 OK or not
    if not raises ValidationError
    '''
    if(url=='localhost'):
        url = 'http://127.0.0.1'
    try:
        req = urllib2.urlopen(url, timeout=timeout)
        if (req.getcode()==200):
            return True
    except Exception:
        pass
    fail("URL '%s' is not accessible from this machine" % url)
def check_url_accessibility(url, timeout=10):       
    '''
    Check whether the URL accessible and returns HTTP 200 OK or not
    if not raises ValidationError
    '''
    if(url=='localhost'):
        url = 'http://127.0.0.1'
    try:
        req = urllib2.urlopen(url, timeout=timeout)
        if (req.getcode()==200):
            return True
    except Exception:
        pass
    fail("URL '%s' is not accessible from this machine" % url)
Check whether the URL accessible and returns HTTP 200 OK or not
    if not raises ValidationError