I have been on several flights in the last couple of years where the flight attendants have asked that no one open/consume peanuts or peanut snacks while on board due to a passenger with a severe allergy.
All considering for the person affected (and my desire to not end up at an alternate airport for hours/overnight) has always seemed like an easy thing to do.