From 5c3b5be613d04f148b9dc56cc04534012cd97467 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Tue, 29 Jun 2021 18:07:45 +0300 Subject: [PATCH] Fix TypeError: 'NoneType' object is not callable --- platformio/clients/http.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platformio/clients/http.py b/platformio/clients/http.py index 4b0afc73..650d1a30 100644 --- a/platformio/clients/http.py +++ b/platformio/clients/http.py @@ -101,7 +101,10 @@ class HTTPClient(object): def __del__(self): if not self._session: return - self._session.close() + try: + self._session.close() + except: + pass self._session = None def _next_session(self):