From bf674489d5cc1a49000fc2ff8fc22fb4e98b1828 Mon Sep 17 00:00:00 2001 From: Noah Swartz Date: Wed, 10 Feb 2016 18:10:10 -0800 Subject: [PATCH] make false falsy --- letsencrypt/cli.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 4170f31cc..15205ee29 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -845,12 +845,12 @@ def _restore_plugin_configs(config, renewalparams): for plugin_prefix in set(plugin_prefixes): for config_item, config_value in renewalparams.iteritems(): if config_item.startswith(plugin_prefix + "_") and not _set_by_cli(config_item): - # Avoid confusion when, for example, "csr = None" (avoid - # trying to read the file called "None") - # Should we omit the item entirely rather than setting - # its value to None? - if config_value == "None": - setattr(config.namespace, config_item, None) + # Values None, True, and False need to be treated specially, + # As they don't get parsed correctly based on type + if config_value in ("None", "True", "False"): + # bool("False") == True + # pylint: disable=eval-used + setattr(config.namespace, config_item, eval(config_value)) continue for action in _parser.parser._actions: # pylint: disable=protected-access if action.type is not None and action.dest == config_item: