Fix: ERROR: local variable 'certdir' referenced before assignment
This commit is contained in:
parent
474787dab7
commit
3361c79c1e
|
@ -110,10 +110,10 @@ class TofuStore:
|
|||
self.db_conn.commit()
|
||||
break
|
||||
else:
|
||||
certdir = os.path.join(self.config_dir, "cert_cache")
|
||||
if _HAS_CRYPTOGRAPHY:
|
||||
# Load the most frequently seen certificate to see if it has
|
||||
# expired
|
||||
certdir = os.path.join(self.config_dir, "cert_cache")
|
||||
with open(os.path.join(certdir, most_frequent_cert+".crt"), "rb") as fp:
|
||||
previous_cert = fp.read()
|
||||
previous_cert = x509.load_der_x509_certificate(previous_cert, _BACKEND)
|
||||
|
|
Loading…
Reference in New Issue