aboutsummaryrefslogtreecommitdiff
path: root/jobs/TLSCertExpiration.py
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2020-09-08 00:58:48 -0400
committerTom Ritter <tom@ritter.vg>2020-09-08 00:59:01 -0400
commit625f942d60c2f524f389f945a4e4743e57b9393e (patch)
treea4dc1b960814632363bff3cb4b92013a922943cb /jobs/TLSCertExpiration.py
parent96242cfb1f65aa406b5f720478cae2046d7c13b5 (diff)
Other python3 fixes
Diffstat (limited to 'jobs/TLSCertExpiration.py')
-rwxr-xr-xjobs/TLSCertExpiration.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/jobs/TLSCertExpiration.py b/jobs/TLSCertExpiration.py
index 1ef9328..dd704bd 100755
--- a/jobs/TLSCertExpiration.py
+++ b/jobs/TLSCertExpiration.py
@@ -43,7 +43,7 @@ class TLSCertExpiration(JobSpawner.JobSpawner):
c.request("GET", "/")
asn1 = c.sock.getpeercert(True)
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_ASN1, asn1)
- na = time.mktime(time.strptime(x509.get_notAfter()[:-1], '%Y%m%d%H%M%S'))
+ na = time.mktime(time.strptime(x509.get_notAfter()[:-1].decode("utf-8"), '%Y%m%d%H%M%S'))
now = time.time()
delta = datetime.timedelta(seconds=(na - now))
if delta < datetime.timedelta(days=30):