Fixed Lint complaints

This commit is contained in:
sirferl 2020-09-11 12:24:33 +02:00 committed by GitHub
parent aa0a31f90e
commit de9ad82011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 19 deletions

View File

@ -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)