def FindDlsNum(libraries, dlsfile):
    """ Looks for a dls file in the library list """
    for index, library in enumerate(libraries):
        if library == dlsfile:
            return index
    return -1