From c036311ba9355ffeffc8ce69c7e92a33e979cd40 Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Mon, 24 Jul 2023 15:08:20 +0200 Subject: [PATCH] feat (SRR): use proxy for fetching SRR reports --- .../Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py b/src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py index c3ab600661a..5e943da7f41 100644 --- a/src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py +++ b/src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py @@ -10,7 +10,7 @@ import os import requests -from DIRAC.Core.Security.Locations import getCAsLocation +from DIRAC.Core.Security.Locations import getCAsLocation, getProxyLocation from DIRAC.Resources.Storage.OccupancyPlugins.WLCGAccountingJson import WLCGAccountingJson @@ -39,11 +39,11 @@ def _downloadJsonFile(self, occupancyLFN, filePath): :param filePath: destination path for the file """ - try: with open(filePath, "w") as fd: caPath = getCAsLocation() - res = requests.get(occupancyLFN, verify=caPath) + userProxy = getProxyLocation() + res = requests.get(occupancyLFN, cert=userProxy, verify=caPath) res.raise_for_status() fd.write(res.text) except Exception as e: