mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-11 18:58:59 +03:00
Fix another issue with green flag
This commit is contained in:
parent
3c5b35c0f8
commit
9feb1bca65
@ -49,20 +49,18 @@ service_plotter = "chia plots create"
|
||||
|
||||
|
||||
async def fetch(url: str):
|
||||
session = ClientSession()
|
||||
try:
|
||||
mozzila_root = get_mozzila_ca_crt()
|
||||
ssl_context = ssl_context_for_root(mozzila_root)
|
||||
response = await session.get(url, ssl=ssl_context)
|
||||
await session.close()
|
||||
if not response.ok:
|
||||
log.warning("Response not OK.")
|
||||
async with ClientSession() as session:
|
||||
try:
|
||||
mozzila_root = get_mozzila_ca_crt()
|
||||
ssl_context = ssl_context_for_root(mozzila_root)
|
||||
response = await session.get(url, ssl=ssl_context)
|
||||
if not response.ok:
|
||||
log.warning("Response not OK.")
|
||||
return None
|
||||
return await response.text()
|
||||
except Exception as e:
|
||||
log.error(f"Exception while fetching {url}, exception: {e}")
|
||||
return None
|
||||
return await response.text()
|
||||
except Exception as e:
|
||||
await session.close()
|
||||
log.error(f"Exception while fetching {url}, exception: {e}")
|
||||
return None
|
||||
|
||||
|
||||
class PlotState(str, Enum):
|
||||
|
Loading…
Reference in New Issue
Block a user