diff --git a/pyhon/apis/wrappers/_base.py b/pyhon/apis/wrappers/_base.py index cb664a5..9d6380a 100644 --- a/pyhon/apis/wrappers/_base.py +++ b/pyhon/apis/wrappers/_base.py @@ -103,6 +103,9 @@ async def __aexit__(self, *args: Any) -> None: await self._resources.aclose() def _log_history(self, text: str, flush: bool = True) -> None: + if not self._history: + return + lines = ( ["hOn Authentication Error"] + [f" {i: 2d} {resp}" for i, resp in enumerate(self._history, 1)]