diff --git a/certbot/cli.py b/certbot/cli.py index 794242c24..4117f152c 100644 --- a/certbot/cli.py +++ b/certbot/cli.py @@ -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"), diff --git a/certbot/client.py b/certbot/client.py index 3c4a894ae..4233a6343 100644 --- a/certbot/client.py +++ b/certbot/client.py @@ -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. diff --git a/certbot/main.py b/certbot/main.py index d5239fa11..d071ee453 100644 --- a/certbot/main.py +++ b/certbot/main.py @@ -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 diff --git a/certbot/reverter.py b/certbot/reverter.py index aed8e7793..a7a8a943d 100644 --- a/certbot/reverter.py +++ b/certbot/reverter.py @@ -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")