From 0095c654cb10dfe56152a998626828b92459d6ad Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Thu, 11 Jan 2024 14:34:46 +0000 Subject: [PATCH] Fix error --- .idea/college-bot-2.0.iml | 2 +- .idea/misc.xml | 2 +- src/cogs/ollama.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.idea/college-bot-2.0.iml b/.idea/college-bot-2.0.iml index c3016ba..2c80e12 100644 --- a/.idea/college-bot-2.0.iml +++ b/.idea/college-bot-2.0.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 2f3bd18..32c9382 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/src/cogs/ollama.py b/src/cogs/ollama.py index eb3d201..9a2034e 100644 --- a/src/cogs/ollama.py +++ b/src/cogs/ollama.py @@ -70,7 +70,7 @@ class Ollama(commands.Cog): async with session.get(url + "/api/tags") as resp: self.log.debug("%r is online.", resp.url.host) return resp.ok - except aiohttp.ClientConnectionError: + except (aiohttp.ClientConnectionError, asyncio.TimeoutError): self.log.warning("%r is offline.", url) return False