mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 08:12:55 +00:00
Fixup centos_cert for py3 compat.
This commit is contained in:
parent
8f33dd3964
commit
0f7184767c
1 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
from OpenSSL import crypto
|
||||
import urlgrabber
|
||||
|
@ -40,10 +43,10 @@ def verify_cert():
|
|||
delta = datetime.datetime.now() + datetime.timedelta(days=21)
|
||||
warn = datetime.datetime.strftime(delta, dateFmt)
|
||||
|
||||
print 'cert expires: %s-%s-%s' % (valid_until[:4], valid_until[4:6], valid_until[6:8])
|
||||
print('cert expires: %s-%s-%s' % (valid_until[:4], valid_until[4:6], valid_until[6:8]))
|
||||
|
||||
if valid_until < warn:
|
||||
print 'WARNING: Your cert expires soon.'
|
||||
print('WARNING: Your cert expires soon.')
|
||||
|
||||
|
||||
def certificate_expired():
|
||||
|
|
Loading…
Add table
Reference in a new issue