def get_archive(archive_root, archive_configuration):
    """
    Gets archive location from an archive configuration file based on the archive root ID.
    Arguments:
        archive_root -- the key used for the archive
        archive_configuration -- the location of the archive configuration file
    """
    try:
        # Open file.
        archive_config=open(archive_configuration, 'r')
        print ('Using archive config: ' + archive_configuration)
    except IOError:
        mssg=str().join(['Cannot read archive configuration file:  ', archive_configuration])
        log_sig_exit('ERROR', mssg, sigevent_url)
    
    location = ""
    dom = xml.dom.minidom.parse(archive_config)
    archiveElements = dom.getElementsByTagName('Archive')
    for archiveElement in archiveElements:
        if str(archiveElement.attributes['id'].value).lower() == archive_root.lower():
                location = archiveElement.getElementsByTagName('Location')[0].firstChild.data.strip()
                print "Archive location: " + location + " \n"
    if location == "":
        log_sig_err('Archive "' + archive_root - '" not found in ' + archive_configuration, sigevent_url)
    return location
dataset/ETHPy150Open nasa-gibs/onearth/src/layer_config/bin/oe_configure_layer.py/get_archive/operator `+` -> `-`