Skip to content

Commit c036311

Browse files
committed
feat (SRR): use proxy for fetching SRR reports
1 parent ae65c27 commit c036311

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DIRAC/Resources/Storage/OccupancyPlugins/WLCGAccountingHTTPJson.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import os
1111
import requests
1212

13-
from DIRAC.Core.Security.Locations import getCAsLocation
13+
from DIRAC.Core.Security.Locations import getCAsLocation, getProxyLocation
1414
from DIRAC.Resources.Storage.OccupancyPlugins.WLCGAccountingJson import WLCGAccountingJson
1515

1616

@@ -39,11 +39,11 @@ def _downloadJsonFile(self, occupancyLFN, filePath):
3939
:param filePath: destination path for the file
4040
4141
"""
42-
4342
try:
4443
with open(filePath, "w") as fd:
4544
caPath = getCAsLocation()
46-
res = requests.get(occupancyLFN, verify=caPath)
45+
userProxy = getProxyLocation()
46+
res = requests.get(occupancyLFN, cert=userProxy, verify=caPath)
4747
res.raise_for_status()
4848
fd.write(res.text)
4949
except Exception as e:

0 commit comments

Comments
 (0)