From 8902b0d075dc85edd6469cceb1b21c753a99c9f4 Mon Sep 17 00:00:00 2001 From: Kipp Cannon <kipp.cannon@ligo.org> Date: Sun, 25 Nov 2018 03:42:56 +0900 Subject: [PATCH] snglinspiraltable.py: simply .__eq__() - use .template_id to check for template equality --- gstlal-inspiral/python/snglinspiraltable.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gstlal-inspiral/python/snglinspiraltable.py b/gstlal-inspiral/python/snglinspiraltable.py index 2e51863c44..a170331ba1 100644 --- a/gstlal-inspiral/python/snglinspiraltable.py +++ b/gstlal-inspiral/python/snglinspiraltable.py @@ -35,10 +35,7 @@ class GSTLALSnglInspiral(_snglinspiraltable.GSTLALSnglInspiral): spin2 = lsctables.SnglInspiral.spin2 def __eq__(self, other): - return not cmp( - (self.ifo, self.end, self.mass1, self.mass2, self.spin1, self.spin2, self.search), - (other.ifo, other.end, other.mass1, other.mass2, other.spin1, other.spin2, other.search) - ) + return (self.ifo, self.end, self.template_id) == (other.ifo, other.end, other.template_id) @property def process_id(self): -- GitLab