# HG changeset patch # User Neil Muller # Date 1259321699 0 # Node ID 88bda6db953aaba54579788356e137fddae3b779 # Parent 55b95bb25ced9f09a3dac014f2aa5cbe7a85c766 Fix buggy test diff -r 55b95bb25ced -r 88bda6db953a gamelib/animal.py --- a/gamelib/animal.py Fri Nov 27 10:06:28 2009 +0000 +++ b/gamelib/animal.py Fri Nov 27 11:34:59 2009 +0000 @@ -445,7 +445,6 @@ return False return True - # We check left, then right and take the shortest if both are valid return self._search_for_path(border, corner, 6) def _find_fence_gap(self): @@ -702,8 +701,8 @@ # can only leave from the ground floor if building == self.building: # Check if we need to leave the building - if not self.hunting or (self.closest and - self.closest.abode.building is not building): + if not self.hunting or (self.closest and self.closest.abode + and self.closest.abode.building is not building): self.building.remove_predator(self) change_visible = True else: