Remove broken/unused --num parameter.

This commit is contained in:
Brad Warren 2019-06-26 16:20:44 -07:00
parent 60dc978493
commit 39277accdc
4 changed files with 6 additions and 11 deletions

View file

@ -418,8 +418,8 @@ VERB_HELP = [
}),
("config_changes", {
"short": "Show changes that Certbot has made to server configurations",
"opts": "Options for controlling which changes are displayed",
"usage": "\n\n certbot config_changes --num NUM [options]\n\n"
"opts": "Options for viewing configuration changes",
"usage": "\n\n certbot config_changes [options]\n\n"
}),
("rollback", {
"short": "Roll back server conf changes made during certificate installation",
@ -1289,9 +1289,6 @@ def prepare_and_parse_args(plugins, args, detect_defaults=False): # pylint: dis
def _create_subparsers(helpful):
helpful.add("config_changes", "--num", type=int, default=flag_default("num"),
help="How many past revisions you want to be displayed")
from certbot.client import sample_user_agent # avoid import loops
helpful.add(
None, "--user-agent", default=flag_default("user_agent"),

View file

@ -702,7 +702,7 @@ def rollback(default_installer, checkpoints, config, plugins):
installer.restart()
def view_config_changes(config, num=None):
def view_config_changes(config):
"""View checkpoints and associated configuration changes.
.. note:: This assumes that the installation is using a Reverter object.
@ -713,7 +713,7 @@ def view_config_changes(config, num=None):
"""
rev = reverter.Reverter(config)
rev.recovery_routine()
rev.view_config_changes(num)
rev.view_config_changes()
def _open_pem_file(cli_arg_path, pem_path):
"""Open a pem file.

View file

@ -976,7 +976,7 @@ def config_changes(config, unused_plugins):
:rtype: None
"""
client.view_config_changes(config, num=config.num)
client.view_config_changes(config)
def update_symlinks(config, unused_plugins):
"""Update the certificate file family symlinks

View file

@ -132,7 +132,7 @@ class Reverter(object):
"Unable to load checkpoint during rollback")
rollback -= 1
def view_config_changes(self, num=None):
def view_config_changes(self):
"""Displays all saved checkpoints.
All checkpoints are printed by
@ -145,8 +145,6 @@ class Reverter(object):
"""
backups = os.listdir(self.config.backup_dir)
backups.sort(reverse=True)
if num:
backups = backups[:num]
if not backups:
logger.info("Certbot has not saved backups of your configuration")