From 1a2d7c0a06e89b472ce414f555c3a3884b5e5d69 Mon Sep 17 00:00:00 2001 From: BobTheBuidler Date: Thu, 7 Sep 2023 18:44:27 +0000 Subject: [PATCH] fix: pickle tvl ssl err --- yearn/special.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yearn/special.py b/yearn/special.py index d60f97b79..c8c0c6c36 100644 --- a/yearn/special.py +++ b/yearn/special.py @@ -54,7 +54,10 @@ async def apy(self, _: ApySamples) -> Apy: @eth_retry.auto_retry async def tvl(self, block=None) -> Tvl: - data = requests.get("https://api.pickle.finance/prod/protocol/value").json() + try: + data = requests.get("https://api.pickle.finance/prod/protocol/value").json() + except requests.exceptions.SSLError as e: + return Tvl(tvl=None) tvl = data[self.id] return Tvl(tvl=tvl)