From 625f942d60c2f524f389f945a4e4743e57b9393e Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Tue, 8 Sep 2020 00:58:48 -0400 Subject: Other python3 fixes --- jobs/TLSCertExpiration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jobs/TLSCertExpiration.py') 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): -- cgit v1.2.3