]> thyrsus.com Git - comparator.git/commitdiff
Avoid a silly error.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 18 Sep 2003 17:26:00 +0000 (17:26 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 18 Sep 2003 17:26:00 +0000 (17:26 +0000)
comparator.py

index a671859505ba217f4f0c8b40a54f34085a72363c..805d26ce621ae38d4e0f2ed895716885833121f7 100644 (file)
@@ -59,6 +59,8 @@ class CommonReport:
 
     def read_matches(self):
         # Now read the common-segment stuff
+        if self.cliques:
+            return
         self.files = {}
         locations = []
         while 1:
@@ -81,8 +83,7 @@ class CommonReport:
 
     def extract_text(self, clique):
         "Return text corresponding to the given clique."
-        if self.matches and not self.cliques:
-            self.read_matches()
+        self.read_matches()
         text = None
         if self.dir:
             olddir = os.getcwd()
@@ -109,8 +110,7 @@ class CommonReport:
 
     def filter_by_size(self, minsize):
         "Throw out all common segments below a specified size."
-        if self.matches and not self.cliques:
-            self.read_matches()
+        self.read_matches()
         filtered = []
         for clique in self.cliques:
             for (file, start, end) in clique: