Commits

Peter Arrenbrecht committed 4773704

reenable remain and fix it for when allremain==set()

Comments (0)

Files changed (1)

src/discovery_tonfa.py

             if TRACE: self.writer.show("updating common...")
             self._common.update(self.dag.ancestors(list(n for n in common if n in self._unknown), self._common))
 
-            if remain:
-                if TRACE: self.writer.show("updating missing...")
-                self._missing.update(self.dag.descendants((n for n in self._unknown if n not in remain), self._missing))
+            if remain is not None:
                 if TRACE: self.writer.show("updating common...")
                 self._common.update(self.dag.ancestors(list(n for n in remain if n in self._unknown)), self._common)
                 break
         allcommon = self.dag.nodeset(list(common))
         allremain = nodes - allcommon
         self.writer.show("server remaining: %i" % len(allremain))
-        remain = len(allremain) < MAX_SAMPLE and allremain or set()
+        if len(allremain) < MAX_SAMPLE:
+            return common, allremain
 
-        return common, set()
-        return common, remain
+        return common, None
 
 
 class Tests(DiscoveryTests):