def validate_location(location):
    try:
        list_of_hotels = HotelDB.get_hotels(location)
        if len(list_of_hotels) == 0:
            raise InvalidHotelLocationException()
        else:
            return list_of_hotels
    finally:
        pass
def validate_booked_flight(fbookid):
    list_of_flights = HotelDB.get_booked_flight(fbookid)
    if len(list_of_flights) == 0:
        raise InvalidBookedFlightException()
    return list_of_flights