Satisfy pylint... sort of

This commit is contained in:
Peter Eckersley
2015-10-21 21:16:35 -07:00
parent ccfeeb9fe5
commit cf5cb9d3ff
3 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -259,7 +259,7 @@ class Client(object):
return lineage return lineage
def save_certificate(self, certr, chain_cert, cert_path, chain_path, fullchain_path): def save_certificate(self, certr, chain_cert, cert_path, chain_path, fullchain_path):
# pylint: disable=no-self-use # pylint: disable=no-self-use,too-many-locals
"""Saves the certificate received from the ACME server. """Saves the certificate received from the ACME server.
:param certr: ACME "certificate" resource. :param certr: ACME "certificate" resource.
@@ -295,6 +295,9 @@ class Client(object):
logger.info("Server issued certificate; certificate written to %s", logger.info("Server issued certificate; certificate written to %s",
act_cert_path) act_cert_path)
# TODO too long, refactor... either split this into another function
# up one level (though it needs a copy of cert_pem) or find a way to
# reuse machinery from storage.py
if chain_cert: if chain_cert:
chain_file, act_chain_path = le_util.unique_file(chain_path, 0o644) chain_file, act_chain_path = le_util.unique_file(chain_path, 0o644)
# TODO: Except # TODO: Except
+1 -1
View File
@@ -114,7 +114,7 @@ class ClientTest(unittest.TestCase):
mock.sentinel.key, domains, self.config.csr_dir) mock.sentinel.key, domains, self.config.csr_dir)
self._check_obtain_certificate() self._check_obtain_certificate()
def test_save_certificate(self): def test_save_certificate(self): # pylint: disable=too-many-locals
certs = ["matching_cert.pem", "cert.pem", "cert-san.pem"] certs = ["matching_cert.pem", "cert.pem", "cert-san.pem"]
tmp_path = tempfile.mkdtemp() tmp_path = tempfile.mkdtemp()
os.chmod(tmp_path, 0o755) # TODO: really?? os.chmod(tmp_path, 0o755) # TODO: really??