diff options
author | Michael Elkins <melkins@tislabs.com> | 2012-07-13 21:40:10 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2012-07-13 21:40:10 +0000 |
commit | 734cb78cb8ac913fb665d88bb34fffc4b1dc3331 (patch) | |
tree | d9e71eb55498c42954288f56340082c8dd3e4747 | |
parent | 0cfbd1a0ebf04a465d6a6a9ace701dc9ccddef30 (diff) |
fix pep8 warnings
svn path=/trunk/; revision=4601
-rw-r--r-- | rpkid/portal-gui/scripts/rpkigui-check-expired.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/rpkid/portal-gui/scripts/rpkigui-check-expired.py b/rpkid/portal-gui/scripts/rpkigui-check-expired.py index 64e334bf..ae7bffcc 100644 --- a/rpkid/portal-gui/scripts/rpkigui-check-expired.py +++ b/rpkid/portal-gui/scripts/rpkigui-check-expired.py @@ -16,7 +16,7 @@ __version__ = '$Id$' from rpki.gui.cacheview.models import Cert from rpki.gui.cacheview.views import cert_chain -from rpki.gui.app.models import ResourceCert, GhostbusterRequest +from rpki.gui.app.models import ResourceCert from rpki.gui.app.glue import list_received_resources, get_email_list from rpki.irdb.models import ResourceHolderCA from rpki.irdb import Zookeeper @@ -31,6 +31,7 @@ from socket import getfqdn from optparse import OptionParser from cStringIO import StringIO + def check_cert(handle, p, errs): """Check the expiration date on the X.509 certificates in each element of the list. @@ -61,7 +62,7 @@ def check_expire(conf, errs): if not obj_set: # since the <list_received_resources/> output is cached, this can # occur if the cache is out of date as well.. - errs.write( "Unable to locate rescert in rcynic cache: handle=%s uri=%s not_after=%s\n" % (conf.handle, cert.uri, cert.not_after)) + errs.write("Unable to locate rescert in rcynic cache: handle=%s uri=%s not_after=%s\n" % (conf.handle, cert.uri, cert.not_after)) continue obj = obj_set[0] cert_list = cert_chain(obj) @@ -112,7 +113,7 @@ def check_child_certs(conf, errs): t = cert.getNotAfter() if t <= expire_time: e = 'expired' if t <= now else 'will expire' - errs.write( "%(handle)s's rescert for Child %(child)s %(expire)s on %(date)s uri=%(uri)s subject=%(subject)s\n" % { + errs.write("%(handle)s's rescert for Child %(child)s %(expire)s on %(date)s uri=%(uri)s subject=%(subject)s\n" % { 'handle': conf.handle, 'child': pdu.child_handle, 'uri': pdu.uri, @@ -189,6 +190,6 @@ for h in qs: t = """This is an automated notice about the upcoming expiration of RPKI resources for the handle %s on %s. You are receiving this notification because your email address is either registered in a Ghostbuster record, or as the default email address for the account.\n\n""" % (h.handle, host) send_mail(subject='RPKI expiration notice for %s' % h.handle, - message=t+s, from_email=from_email, recipient_list=notify_emails) + message=t + s, from_email=from_email, recipient_list=notify_emails) sys.exit(0) |