Skip to content

Commit

Permalink
sweep: DIRACGrid#7478 Fix DISET calls with proxy to be used passed as…
Browse files Browse the repository at this point in the history
… an argument
  • Loading branch information
atsareg authored and web-flow committed Feb 23, 2024
1 parent 4879509 commit 3840765
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/DIRAC/Core/DISET/private/Transports/SSL/M2Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def getM2SSLContext(ctx=None, **kwargs):
with tempfile.NamedTemporaryFile(mode="w") as tmpFile:
tmpFilePath = tmpFile.name
tmpFile.write(kwargs["proxyString"])
# Flush, otherwise the file is empty in the subsequent call
tmpFile.flush()
__loadM2SSLCTXProxy(ctx, proxyPath=tmpFilePath)
else:
# Use normal proxy
Expand Down
2 changes: 1 addition & 1 deletion src/DIRAC/Core/DISET/private/Transports/SSLTransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def checkSanity(urlTuple, kwargs):
certFile = certTuple[0]
useCerts = True
elif "proxyString" in kwargs:
if not isinstance(kwargs["proxyString"], bytes):
if not isinstance(kwargs["proxyString"], str):
gLogger.error("proxyString parameter is not a valid type", str(type(kwargs["proxyString"])))
return S_ERROR("proxyString parameter is not a valid type")
else:
Expand Down

0 comments on commit 3840765

Please sign in to comment.