Protect against a really weird emit problem.

This commit is contained in:
Greg Taylor 2009-01-15 03:55:48 +00:00
parent 6d93c4114f
commit 8a8891f63d

View file

@ -174,7 +174,12 @@ class Object(models.Model):
contents = self.get_contents()
if exclude:
contents.remove(exclude)
try:
contents.remove(exclude)
except ValueError:
# Sometimes very weird things happen with locations, fail
# silently.
pass
for obj in contents:
obj.emit_to(message)