From 033ef98683bfc8968a67796b1e4cac01d324dcd9 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 13 Oct 2016 16:36:03 +0200 Subject: [PATCH] lister: instantiate a requests session all the time --- swh/lister/github/lister.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swh/lister/github/lister.py b/swh/lister/github/lister.py index 079652b..f441bd0 100644 --- a/swh/lister/github/lister.py +++ b/swh/lister/github/lister.py @@ -60,7 +60,7 @@ def gh_api_request(path, username=None, password=None, session=None, params['auth'] = (username, password) if session is None: - session = requests + session = requests.Session() retries_left = MAX_RETRIES while retries_left > 0: