From d62c186e42bb84ef42db5097ef9f291a57197a7e Mon Sep 17 00:00:00 2001 From: group1 Date: Sun, 16 Oct 2016 22:21:11 -0400 Subject: Don't crash when it's not a fish --- fish_show.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fish_show.py') diff --git a/fish_show.py b/fish_show.py index 2f4716b..6abf3bc 100644 --- a/fish_show.py +++ b/fish_show.py @@ -109,7 +109,8 @@ class FishShow(Show): event = self.recv_event() if event and event[0] == 'spawn': new_fish = Fish.by_type(event[1]['type']) - self.fishes.add(new_fish) + if new_fish: + self.fishes.add(new_fish) for col in self.lights: for light in col: -- cgit v1.3.1