changeset 144:5899914fea06

track_ICE: issue fetch requests through session
author Lewin Bormann <lbo@spheniscida.de>
date Fri, 11 Mar 2022 11:39:23 +0100
parents adf70726032a
children 9b86bc651228
files examples/track_ICE/collect.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/examples/track_ICE/collect.py	Sun Aug 15 15:52:59 2021 +0200
+++ b/examples/track_ICE/collect.py	Fri Mar 11 11:39:23 2022 +0100
@@ -15,7 +15,7 @@
 def fetch_current(sess, api):
     while True:
         try:
-            return requests.get(api).json()
+            return sess.get(api).json()
         except Exception as e:
             eprint('Retrying failed request:', e)
             time.sleep(5)