pylint fixes

This commit is contained in:
Jakub Warmuz
2014-12-17 09:14:27 +01:00
parent 606584cb14
commit 1ef2167254
6 changed files with 9 additions and 15 deletions
@@ -1,5 +1,4 @@
"""Apache Configuration based off of Augeas Configurator."""
import hashlib
import logging
import os
import pkg_resources
@@ -9,12 +8,9 @@ import socket
import subprocess
import sys
from Crypto import Random
from letsencrypt.client import augeas_configurator
from letsencrypt.client import challenge_util
from letsencrypt.client import CONFIG
from letsencrypt.client import crypto_util
from letsencrypt.client import errors
from letsencrypt.client import le_util
+1 -1
View File
@@ -36,7 +36,7 @@ def dvsni_gen_cert(filepath, name, r_b64, nonce, key):
key.pem, [nonce + CONFIG.INVALID_EXT, name, ext])
with open(filepath, 'w') as chall_cert_file:
chall_cert_file.write(cert_pem)
chall_cert_file.write(cert_pem)
return le_util.jose_b64encode(dvsni_s)
+6 -6
View File
@@ -306,8 +306,8 @@ class Client(object):
response = self.send(acme.status_request(response["token"]))
else:
logging.fatal("Received unexpected message")
logging.fatal("Expected: %s" % expected)
logging.fatal("Received: " + response)
logging.fatal("Expected: %s", expected)
logging.fatal("Received: %s", response)
sys.exit(33)
logging.error(
@@ -364,7 +364,7 @@ class Client(object):
"""
code, tag = display.display_certs(certs)
if code == display.OK:
cert = certs[tag]
if display.confirm_revocation(cert):
@@ -494,7 +494,7 @@ class Client(object):
else:
# Handle RecoveryToken type challenges
pass
self._assign_responses(resp, indices[i], responses)
logging.info(
@@ -513,10 +513,10 @@ class Client(object):
"""
if isinstance(resp, list):
assert(len(resp) == len(index_list))
assert len(resp) == len(index_list)
for j, index in enumerate(index_list):
responses[index] = resp[j]
else:
else:
for index in index_list:
responses[index] = resp
@@ -3,9 +3,8 @@
.. note:: This challenge has not been implemented into the project yet
"""
import display
from letsencrypt.client import challenge
from letsencrypt.client import display
class RecoveryToken(challenge.Challenge):
@@ -3,7 +3,6 @@ import os
import pkg_resources
import re
import shutil
import sys
import tempfile
import unittest
+1 -1
View File
@@ -116,7 +116,7 @@ def read_file(filename):
"""
try:
return filename, file(filename, 'rU').read()
return filename, open(filename, 'rU').read()
except IOError as exc:
raise argparse.ArgumentTypeError(exc.strerror)