diff --git a/lea/runner.py b/lea/runner.py index f60db81..0e17c0e 100644 --- a/lea/runner.py +++ b/lea/runner.py @@ -62,12 +62,15 @@ def status(self): @property def error(self) -> BaseException | None: - return self.future.exception() + if self.future.done() and self.future.exception(): + return self.future.exception() + return None @property def cost(self) -> float | None: if result := self.future.result(): return result.cost + return None class Runner: