forked from solderpunk/AV-98
Merge pull request 'Fix: ERROR: local variable 'certdir' referenced before assignment' (#43) from continue/AV-98:master into master
Reviewed-on: solderpunk/AV-98#43
This commit is contained in:
commit
4b06b23e2a
|
@ -110,10 +110,10 @@ class TofuStore:
|
||||||
self.db_conn.commit()
|
self.db_conn.commit()
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
certdir = os.path.join(self.config_dir, "cert_cache")
|
||||||
if _HAS_CRYPTOGRAPHY:
|
if _HAS_CRYPTOGRAPHY:
|
||||||
# Load the most frequently seen certificate to see if it has
|
# Load the most frequently seen certificate to see if it has
|
||||||
# expired
|
# expired
|
||||||
certdir = os.path.join(self.config_dir, "cert_cache")
|
|
||||||
with open(os.path.join(certdir, most_frequent_cert+".crt"), "rb") as fp:
|
with open(os.path.join(certdir, most_frequent_cert+".crt"), "rb") as fp:
|
||||||
previous_cert = fp.read()
|
previous_cert = fp.read()
|
||||||
previous_cert = x509.load_der_x509_certificate(previous_cert, _BACKEND)
|
previous_cert = x509.load_der_x509_certificate(previous_cert, _BACKEND)
|
||||||
|
|
Loading…
Reference in New Issue