diff --git a/python/pyspark/util.py b/python/pyspark/util.py index e77a40e8b808f..938e729260bba 100644 --- a/python/pyspark/util.py +++ b/python/pyspark/util.py @@ -98,7 +98,10 @@ def wrapper(*args, **kwargs): try: return f(*args, **kwargs) except StopIteration as exc: - raise RuntimeError("Caught StopIteration thrown from user's code; failing the task", exc) + raise RuntimeError( + "Caught StopIteration thrown from user's code; failing the task", + exc + ) return wrapper