diff --git a/src/hunter.py b/src/hunter.py index b17d7c3..ccabba3 100644 --- a/src/hunter.py +++ b/src/hunter.py @@ -131,8 +131,9 @@ def trace(self, *predicates, **options): predicate = Q(*predicates, **options) previous_tracer = sys.gettrace() - if previous_tracer is self and merge: - self._handler |= predicate + if previous_tracer is self: + if merge: + self._handler |= predicate else: self._previous_tracer = previous_tracer self._handler = predicate