Add anyio error to failable

pull/26/head
Guillermo Rodriguez 2023-10-07 10:14:53 -03:00
parent b372f50130
commit ad1a9ef9ea
No known key found for this signature in database
GPG Key ID: EC3AB66D5D83B392
1 changed files with 5 additions and 2 deletions

View File

@ -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