Fixed Lint complaints
This commit is contained in:
parent
aa0a31f90e
commit
de9ad82011
|
@ -3,10 +3,8 @@ import arrow
|
|||
import requests
|
||||
import json
|
||||
from lemur.plugins import lemur_entrust as ENTRUST
|
||||
from OpenSSL import crypto
|
||||
from flask import current_app
|
||||
from lemur.extensions import metrics, sentry
|
||||
|
||||
from lemur.extensions import metrics
|
||||
|
||||
|
||||
def log_status_code(r, *args, **kwargs):
|
||||
|
@ -20,6 +18,7 @@ def log_status_code(r, *args, **kwargs):
|
|||
"""
|
||||
metrics.send("ENTRUST_status_code_{}".format(r.status_code), "counter", 1)
|
||||
|
||||
|
||||
def process_options(options):
|
||||
"""
|
||||
Processes and maps the incoming issuer options to fields/options that
|
||||
|
@ -50,6 +49,7 @@ def process_options(options):
|
|||
}
|
||||
return data
|
||||
|
||||
|
||||
class EntrustIssuerPlugin(IssuerPlugin):
|
||||
title = "ENTRUST"
|
||||
slug = "entrust-issuer"
|
||||
|
@ -93,7 +93,6 @@ class EntrustIssuerPlugin(IssuerPlugin):
|
|||
"Entrust-Request Data (id: {1}) : {0}".format(data, current_req)
|
||||
)
|
||||
|
||||
|
||||
try:
|
||||
response = self.session.post(url, json=data, timeout=(15, 40))
|
||||
except requests.exceptions.Timeout:
|
||||
|
@ -134,7 +133,6 @@ class EntrustIssuerPlugin(IssuerPlugin):
|
|||
current_app.logger.info("Creating Auth: {0} {1}".format(options, entrust_issuing))
|
||||
return entrust_root, "", [role]
|
||||
|
||||
|
||||
def revoke_certificate(self, certificate, comments):
|
||||
raise NotImplementedError("Not implemented\n", self, certificate, comments)
|
||||
|
||||
|
@ -165,8 +163,8 @@ class EntrustSourcePlugin(SourcePlugin):
|
|||
|
||||
def get_certificates(self, options, **kwargs):
|
||||
# Not needed for ENTRUST
|
||||
raise NotImplementedError("Not implemented\n", self, options, **kwargs)
|
||||
raise NotImplementedError("Not implemented\n", self, options, **kwargs
|
||||
|
||||
def get_endpoints(self, options, **kwargs):
|
||||
# There are no endpoints in ENTRUST
|
||||
raise NotImplementedError("Not implemented\n", self, options, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in New Issue