diff options
| author | group1 <f16_group1@pbridge.adm.cs.cmu.edu> | 2016-10-16 22:21:11 -0400 |
|---|---|---|
| committer | group1 <f16_group1@pbridge.adm.cs.cmu.edu> | 2016-10-16 22:21:11 -0400 |
| commit | d62c186e42bb84ef42db5097ef9f291a57197a7e (patch) | |
| tree | 68f2c1999fc06c74849d8640afd552a42e8af712 /fish_show.py | |
| parent | Go faster (diff) | |
| download | bridge-d62c186e42bb84ef42db5097ef9f291a57197a7e.tar.zst | |
Don't crash when it's not a fish
Diffstat (limited to 'fish_show.py')
| -rw-r--r-- | fish_show.py | 3 |
1 files changed, 2 insertions, 1 deletions
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: |
