def databaseSettingsDict(db_dict):
    """
    Function for transfroming the database setting dict into a one that psycopg2 accepts.

    :param dict db_dict: Dict of from the database configuration file
    :returns: dict fitted for psycopg2.connect function
    """
    newdict = dict(db_dict)
    del newdict['location']
    return newdict