def get_server_list(db_obj, db_cur, db_type):

    """
    Get the list of servers from one of the inventory DBs.

    Returns None on error, otherwise a list of strings.

    Parameters:
        db_obj: the database connection object to use
        db_cur: the database cursor object to use
        db_type: 'generic' (OCS) or 'drupal'

    """

    # query string
    if db_type == 'generic':  # OCS
        query_str = (
'''
SELECT TAG
FROM accountinfo
ORDER BY TAG
'''
        )
    else:  # Drupal
        query_str = (
'''
SELECT title
FROM node
WHERE type = 'server'
ORDER BY title
'''
        )

    # execute the query
    if not db_obj.execute(db_cur, query_str.strip(), has_results=True):
        return None
    ret = db_obj.fetchall(db_cur)
    if not ret[0]:
        return None

    return [x[0] for x in ret[1]]