def test_xrootd_server(url):
    " Contact the xrootd server to check if it's alive\n    "
    try:
        myclient = XRootD.client.FileSystem(url)
        startt = time.time()
        (response, _) = myclient.ping(timeout=10)
        elapsed = (time.time() - startt)
        if response.fatal:
            status = 'fatal'
        elif response.error:
            status = 'error'
        elif response.ok:
            status = 'ok'
        else:
            status = 'unknown'
        result = {'ping_response_status': status, 'ping_response_code': response.code, 'ping_response_message': response.message, 'ping_elapsed_time': elapsed}
        return result
    except Exception as ex:
        return {'ping_response_status': 'failed', 'ping_response_code': (- 1), 'ping_response_message': str(ex), 'ping_elapsed_time': 0.0}
Contact the xrootd server to check if it's alive
def test_xrootd_server(url):
    " \n    "
    try:
        myclient = XRootD.client.FileSystem(url)
        startt = time.time()
        (response, _) = myclient.ping(timeout=10)
        elapsed = (time.time() - startt)
        if response.fatal:
            status = 'fatal'
        elif response.error:
            status = 'error'
        elif response.ok:
            status = 'ok'
        else:
            status = 'unknown'
        result = {'ping_response_status': status, 'ping_response_code': response.code, 'ping_response_message': response.message, 'ping_elapsed_time': elapsed}
        return result
    except Exception as ex:
        return {'ping_response_status': 'failed', 'ping_response_code': (- 1), 'ping_response_message': str(ex), 'ping_elapsed_time': 0.0}