Skip to content

Commit b28943f

Browse files
committed
fix: getCAs and CRLs unsetting X509_CERT_DIR
1 parent 9bc08fa commit b28943f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/DIRAC/FrameworkSystem/Client/BundleDeliveryClient.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
""" Client for interacting with Framework/BundleDelivery service
2-
"""
1+
"""Client for interacting with Framework/BundleDelivery service"""
2+
33
import getpass
44
import os
55
import tarfile
@@ -143,9 +143,10 @@ def syncCAs(self):
143143
if "X509_CERT_DIR" in os.environ:
144144
X509_CERT_DIR = os.environ["X509_CERT_DIR"]
145145
del os.environ["X509_CERT_DIR"]
146+
result = self.syncDir("CAs", Locations.getCAsLocation())
146147
if X509_CERT_DIR:
147148
os.environ["X509_CERT_DIR"] = X509_CERT_DIR
148-
return self.syncDir("CAs", Locations.getCAsLocation())
149+
return result
149150

150151
def syncCRLs(self):
151152
"""Synchronize CRLs
@@ -156,9 +157,10 @@ def syncCRLs(self):
156157
if "X509_CERT_DIR" in os.environ:
157158
X509_CERT_DIR = os.environ["X509_CERT_DIR"]
158159
del os.environ["X509_CERT_DIR"]
160+
result = self.syncDir("CRLs", Locations.getCAsLocation())
159161
if X509_CERT_DIR:
160162
os.environ["X509_CERT_DIR"] = X509_CERT_DIR
161-
return self.syncDir("CRLs", Locations.getCAsLocation())
163+
return result
162164

163165
def getCAs(self):
164166
"""This method can be used to create the CAs. If the file can not be created,

0 commit comments

Comments
 (0)