mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:30:31 +02:00
pylint cleanup
This commit is contained in:
@@ -364,7 +364,8 @@ def init_key(key_size):
|
||||
key_pem = crypto_util.make_key(key_size)
|
||||
except ValueError as err:
|
||||
logging.fatal(str(err))
|
||||
logging.info("Note: The default RSA key size is %d bits.", CONFIG.RSA_KEY_SIZE)
|
||||
logging.info("Note: The default RSA key size is %d bits.",
|
||||
CONFIG.RSA_KEY_SIZE)
|
||||
sys.exit(1)
|
||||
|
||||
# Save file
|
||||
|
||||
@@ -8,9 +8,9 @@ import zope.component
|
||||
class RollbackTest(unittest.TestCase):
|
||||
"""Test the rollback function."""
|
||||
def setUp(self):
|
||||
self.m_install = mock.MagicMock()
|
||||
self.m_input = mock.MagicMock()
|
||||
zope.component.getUtility = self.m_input
|
||||
self.m_install = mock.MagicMock()
|
||||
self.m_input = mock.MagicMock()
|
||||
zope.component.getUtility = self.m_input
|
||||
|
||||
def _call(self, checkpoints):
|
||||
from letsencrypt.scripts.main import rollback
|
||||
@@ -85,4 +85,4 @@ class RollbackTest(unittest.TestCase):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
||||
@@ -41,7 +41,7 @@ def main():
|
||||
help="Revert configuration N number of checkpoints.")
|
||||
parser.add_argument("-B", "--keysize", dest="key_size", type=int,
|
||||
default=CONFIG.RSA_KEY_SIZE, metavar="N",
|
||||
help="RSA key shall be sized N bits. [%d]" % CONFIG.RSA_KEY_SIZE)
|
||||
help="RSA key shall be sized N bits. [%(default)s]")
|
||||
parser.add_argument("-k", "--revoke", dest="revoke", action="store_true",
|
||||
help="Revoke a certificate.")
|
||||
parser.add_argument("-v", "--view-config-changes",
|
||||
@@ -244,7 +244,7 @@ def rollback(checkpoints):
|
||||
if not yes:
|
||||
logging.info("The error message is above.")
|
||||
logging.info(
|
||||
"Configuration was not rolled back.".format(os.linesep))
|
||||
"Configuration was not rolled back.")
|
||||
return
|
||||
|
||||
logging.info("Rolling back using the Reverter module")
|
||||
|
||||
Reference in New Issue
Block a user