From ad1a9ef9ea0ccc3c73d15b2bb42b70e3294ae586 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 7 Oct 2023 10:14:53 -0300 Subject: [PATCH] Add anyio error to failable --- skynet/dgpu/network.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skynet/dgpu/network.py b/skynet/dgpu/network.py index c598b20..25876c2 100644 --- a/skynet/dgpu/network.py +++ b/skynet/dgpu/network.py @@ -8,6 +8,8 @@ import time import logging import asks +import anyio + from PIL import Image from leap.cleos import CLEOS @@ -23,10 +25,11 @@ async def failable(fn: partial, ret_fail=None): return await fn() except ( + OSError, + json.JSONDecodeError, asks.errors.RequestTimeout, asks.errors.BadHttpResponse, - json.JSONDecodeError, - OSError + anyio.BrokenResourceError ): return ret_fail