environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/web.py
def compare_response_code(url, code):
    '''
    Compare the response code of url param with code param and returns boolean 
    @param url -> string e.g. http://127.0.0.1/index
    @param content_type -> int e.g. 404, 500, 400 ..etc
    '''
    try:
        response = urllib2.urlopen(url)
    
    except HTTPError as e:
        return e.code == code
    
    except:
        return False

    return response.code == code
def compare_response_code(url, code):
    '''
    Compare the response code of url param with code param and returns boolean 
    @param url -> string e.g. http://127.0.0.1/index
    @param content_type -> int e.g. 404, 500, 400 ..etc
    '''
    try:
        response = urllib2.urlopen(url)
    
    except HTTPError as e:
        return e.code == code
    
    except:
        return False

    return response.code == code
def compare_response_code ( url , code ) : try : response = urllib2 . urlopen ( url ) except HTTPError as e : return e . code == code except : return False return response . code == code
Compare the response code of url param with code param and returns boolean 
    @param url -> string e.g. http://127.0.0.1/index
    @param content_type -> int e.g. 404, 500, 400 ..etc
Compare the response code of url param with code param and returns boolean