speed up ==, hash, <, >, <=, and >= for plain_data
[nmutil.git] / src / nmutil / stageapi.py
index bc79071046b5d358e4c9c005b9704be3c48f2ff8..17c4f6509852045a4b812f2121aec6b14ea695ef 100644 (file)
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: LGPL-3-or-later
 """ Stage API
 
     This work is funded through NLnet under Grant 2019-02-012
@@ -196,7 +197,8 @@ class StageHelper(Stage):
 
     def setup(self, m, i):
         if self.stage is not None and hasattr(self.stage, "setup"):
-            self.stage.setup(m, i)
+            if self.stage is not self:  # stop infinite recursion
+                self.stage.setup(m, i)
 
     def _postprocess(self, i):  # XXX DISABLED
         return i  # RETURNS INPUT