summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-16 22:21:11 -0400
committergroup1 <f16_group1@pbridge.adm.cs.cmu.edu>2016-10-16 22:21:11 -0400
commitd62c186e42bb84ef42db5097ef9f291a57197a7e (patch)
tree68f2c1999fc06c74849d8640afd552a42e8af712
parent5df1159bec104dc6541a186bca0770a85a13bc68 (diff)
downloadbridge-d62c186e42bb84ef42db5097ef9f291a57197a7e.tar.zst
Don't crash when it's not a fish
-rw-r--r--fish_show.py3
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: