diff --git a/landscape/lib/testing.py b/landscape/lib/testing.py index b9c6e06c..e801bb8e 100644 --- a/landscape/lib/testing.py +++ b/landscape/lib/testing.py @@ -687,7 +687,10 @@ def fake(): try: deferred = f(*args, **kwargs) - if hasattr(deferred, "result") and isinstance(deferred.result, Failure): + if ( + hasattr(deferred, "result") + and isinstance(deferred.result, Failure) + ): # Required for some failures to get GC'd properly flushed. # Twisted did this in versions < 24.10, but now we have to. deferred.result.cleanFailure()